Doesn't start (bzr 1900): type object 'EventsCodes' has no attribute 'IN_MOVED_TO'

Bug #382283 reported by David Wagner
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Medium
reacocard

Bug Description

I downloaded the latest version in bzr (revision 1900) and tried to run it on my Fedora 10 x86_64 machine. It won't start. I get the following error message:

$ exaile --debug --eventdebug --safemode
INFO : Loading Exaile 0.2.99.2+... (xl.main)
INFO : Loading settings (xl.settings)
Traceback (most recent call last):
  File "/usr/local/lib/exaile/exaile.py", line 55, in <module>
    main()
  File "/usr/local/lib/exaile/exaile.py", line 52, in main
    exaile = main.Exaile()
  File "/usr/local/lib/exaile/xl/main.py", line 74, in __init__
    self.__init()
  File "/usr/local/lib/exaile/xl/main.py", line 93, in __init
    self.__show_splash()
  File "/usr/local/lib/exaile/xl/main.py", line 193, in __show_splash
    import xlgui
  File "/usr/local/lib/exaile/xlgui/__init__.py", line 21, in <module>
    from xlgui import guiutil, prefs, plugins, cover, commondialogs, devices, queue
  File "/usr/local/lib/exaile/xlgui/guiutil.py", line 19, in <module>
    from xl import xdg, track, playlist, common
  File "/usr/local/lib/exaile/xl/playlist.py", line 25, in <module>
    from xl import trackdb, event, xdg, track, collection, settings
  File "/usr/local/lib/exaile/xl/collection.py", line 322, in <module>
    EVENT_PROCESSOR = INotifyEventProcessor()
  File "/usr/local/lib/exaile/xl/collection.py", line 242, in __init__
    EventsCodes.IN_CREATE|EventsCodes.IN_DELETE|EventsCodes.IN_CLOSE_WRITE
AttributeError: type object 'EventsCodes' has no attribute 'IN_MOVED_TO'
Exception in thread Thread-2 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib64/python2.5/threading.py", line 486, in __bootstrap_inner
  File "/usr/lib64/python2.5/threading.py", line 664, in run
  File "/usr/lib64/python2.5/threading.py", line 353, in set
  File "/usr/lib64/python2.5/threading.py", line 268, in notifyAll
<type 'exceptions.TypeError'>: 'NoneType' object is not callable

Version 2.14 worked fine. This is the first I've tried version 3.x. The above error message is where I have completely deleted ~/.exaile and everything under it. I also tried launching exaile with a ~/.exaile directory populated by 2.14 (2.14 is known to work with that ~/.exaile directory); no joy either. Omitting "--safemode" or adding "--startgui" makes no difference: it still fails to start up and gives the above error message.

There was nothing under ~/.local/share/exaile, but I deleted the directory just in case; it didn't make a difference. (This was mentioned here: https://bugs.launchpad.net/exaile/+bug/296501)

I noticed another person reporting similar symptoms on one of the forums:
http://www.exaile.org/forum/viewtopic.php?f=4&t=590

When compiling bzr revision 1900, I got the following messages:

$ make
python -m compileall -q xl lib xlgui
Can't list lib
python -O -m compileall -q xl lib xlgui
Can't list lib
cd plugins && make && cd ..
make[1]: Entering directory `/home/daw/e/exaile03/plugins'
python -m compileall -q .
./mpris/__init__.py:35: SyntaxWarning: name '_MPRIS' is used prior to global declaration
  global _MPRIS
python -O -m compileall -q .
./mpris/__init__.py:35: SyntaxWarning: name '_MPRIS' is used prior to global declaration
  global _MPRIS
make[1]: Leaving directory `/home/daw/e/exaile03/plugins'
Ready to install...

If it's relevant, I have the following packages installed:

python-2.5.2-1.fc10.x86_64
notify-python-0.1.1-4.fc10.x86_64
python-inotify-0.8.6-1.git20090518.fc10.noarch
pyevent-0.3-3.fc10.x86_64
libnotify-0.4.4-12.fc10.x86_64
libevent-1.4.5-1.fc10.x86_64

Revision history for this message
David Wagner (daw-bugzilla) wrote :

If it's relevant, exaile 0.3.0a2 has the same behavior (it doesn't start, either, and it outputs the same error message).

Revision history for this message
David Wagner (daw-bugzilla) wrote :

Here's a crazy theory. Could this be a change in the inotify API? Some googling suggests that pyinotify (python-inotify) may have introduced a non-backwards-compatible change in its API.

See http://git.dbzteam.org/?p=pyinotify.git;a=blob;f=NEWS

* Incompatible changes with version 0.7.x
[...]
    * EventsCodes.IN_* replaced by IN_* (avalaible at the pyinotify's scope)

and https://bugs.launchpad.net/entertainer/+bug/246631 (e.g., comment from bighoffa and Greg Auger).

Revision history for this message
Phil Schwartz (phil-schwartz) wrote :

As a quick fix you can modify the exaile/xl/collection.py file. Replace the 5 occurrences of "EventCodes." with "pyinotify.", such that:

        self.mask = pyinotify.IN_MOVED_TO|pyinotify.IN_MOVED_FROM|\
            pyinotify.IN_CREATE|pyinotify.IN_DELETE|pyinotify.IN_CLOSE_WRITE

Revision history for this message
Phil Schwartz (phil-schwartz) wrote :
reacocard (reacocard)
Changed in exaile:
assignee: nobody → Aren Olson (reacocard)
importance: Undecided → Medium
milestone: none → 0.3.0
status: New → Triaged
Revision history for this message
reacocard (reacocard) wrote :

Fixed in r1930

Changed in exaile:
status: Triaged → Fix Committed
Revision history for this message
David Wagner (daw-bugzilla) wrote :

I can confirm that this is fixed, and that revision 1938 now works on Fedora 10 with

python-inotify-0.8.6-1.git20090518.fc10.noarch
notify-python-0.1.1-4.fc10.x86_64

Thanks for the fix, Phil & Aren!

reacocard (reacocard)
Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.