PathWatcher: AssertionError when parent dir is deleted

Issue #7 new
Gary van der Merwe
created an issue

steps to reproduce:

  • Create watch file in sub dir
mkdir /tmp/xyz
touch /tmp/xyz/abc
  • run this python code
import inotify
import inotify.pathwatcher

w = inotify.pathwatcher.PathWatcher()
w.add('/tmp/xyz/abc', inotify.IN_ALL_EVENTS)

while True:
    for evt in
  • Delete a parent dir of the file
rm -r /tmp/xyz


Traceback (most recent call last):
  File "/home/garyvdm/dev/fnb/tickertape/python-gtk-ticker/", line 11, in <module>
    for evt in
  File "/home/garyvdm/dev/python-inotify/ve/lib/python2.7/site-packages/inotify/", line 212, in read
    for e in self._read_events(block):
  File "/home/garyvdm/dev/python-inotify/ve/lib/python2.7/site-packages/inotify/", line 230, in _read_events
    for e in eventiter:
  File "/home/garyvdm/dev/python-inotify/ve/lib/python2.7/site-packages/inotify/", line 531, in handle_event
    assert not self.callbacks

Comments (1)

  1. Log in to comment