f.lux-indicator-applet
f.lux-indicator-applet copied to clipboard
Exception AttributeError out of nowhere
I've been using fluxgui for a long time. Today after a reboot I got this message running it manually from console:
fluxgui is already running, exiting Exception AttributeError: AttributeError("'FluxGUI' object has no attribute 'xflux_controller'",) in <bound method FluxGUI.del of <main.FluxGUI object at 0x7f4e0679b750>> ignored
Well, fluxgui is not running. xflux works flawleslly
uname -a: Linux tiago-linuxbox 3.18.0-031800-generic #201412071935 SMP Mon Dec 8 00:36:34 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Ubuntu 14.04.1
I have the same error coming from nowhere, here is the complete return when I try to launch fluxgui from the terminal:
(fluxapp.py:7152): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(fluxapp.py:7152): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(fluxapp.py:7152): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(fluxapp.py:7152): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(fluxapp.py:7152): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap", Gtk-Message: Failed to load module "canberra-gtk-module" fluxgui is already running, exiting Exception AttributeError: AttributeError("'FluxGUI' object has no attribute 'xflux_controller'",) in
method FluxGUI.del of <main.FluxGUI object at 0x7fed728d8f90>> ignored
As mentionned above, xflux is working good.
Same? error, flux was working fine for months, then stopped working.
starting fluxgui from console gives: fluxgui is already running, exiting Exception AttributeError: AttributeError("'FluxGUI' object has no attribute 'xflux_controller'",) in <bound method FluxGUI.del of <main.FluxGUI object at 0x7f8ab38ff2d0>> ignored
xflux seems to work. flux.x86_64 1.0-2.fc22 Linux 4.1.6-201.fc22.x86_64 Fedora 22
Same here. I fixed it removing the pidfile and running it again. Source: http://soledadpenades.com/2011/08/01/fix-the-fluxgui-is-already-running-exiting-error/
rm ~/.fluxgui.pid
Thanks @RomuloOliveira it helped me :)
Yep @RomuloOliveira that was it. Thanks
The correct behavior, I think, is printing out the message:
fluxgui is already running, exiting
and then exiting without modifying the PID file or showing additional (IMO distracting) information.
The AttributeError is currently shown as well because:
- FluxGUI.init calls FluxGUI.check_pid() before defining self.xflux_controller
- FluxGUI.check_pid() results in a call to FluxGUI.del
- FluxGUI.del calls FluxGUI.exit, which assumes that xflux_controller is defined.
I have a hack in my fork that shows (only) the error message; see:
https://github.com/nrfulton/f.lux-indicator-applet/commit/641c12d367907b0a5499fb033b6b5dcb61580633
Caveat emptor; not tested.
(Also, this is somehow related to Issue #49. I'm not sure if there's a fluxgui-specific problem here, or if this is just the usual thing that happens with pid files sometimes. I encounter this error every so often. I assume the PID file exists due to an improper system shutdown, flux is not running, and some other process now has the PID in the fluxgui PID file. I'm using /var/lock instead of ~ now to see if the problem goes away.)
(edit 1: concision & clarity.) (edit 2: added note about /var/lock)
This is still an issue as of 8th Dec 2015.
thanks @RomuloOliveira, still an issue on Ubuntu Wily.
Thanks for the workaround @RomuloOliveira, still had this problem in an unofficial Ubuntu Xenial build.
Thanks @RomuloOliveira ! :)