f.lux-indicator-applet icon indicating copy to clipboard operation
f.lux-indicator-applet copied to clipboard

Exception AttributeError out of nowhere

Open trinaldi opened this issue 10 years ago • 10 comments

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

trinaldi avatar Jan 28 '15 03:01 trinaldi

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.

yankelahiany avatar Apr 24 '15 06:04 yankelahiany

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

jontis avatar Sep 19 '15 06:09 jontis

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

RomuloOliveira avatar Oct 06 '15 12:10 RomuloOliveira

Thanks @RomuloOliveira it helped me :)

arianmaykon avatar Nov 17 '15 23:11 arianmaykon

Yep @RomuloOliveira that was it. Thanks

jdemonasterio avatar Nov 25 '15 01:11 jdemonasterio

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)

nrfulton avatar Nov 29 '15 00:11 nrfulton

This is still an issue as of 8th Dec 2015.

josephdviviano avatar Dec 08 '15 05:12 josephdviviano

thanks @RomuloOliveira, still an issue on Ubuntu Wily.

quanengineering avatar Feb 12 '16 13:02 quanengineering

Thanks for the workaround @RomuloOliveira, still had this problem in an unofficial Ubuntu Xenial build.

th0rgall avatar Apr 27 '16 08:04 th0rgall

Thanks @RomuloOliveira ! :)

ojacquemart avatar Jun 06 '16 20:06 ojacquemart