Traceback (most recent call last):
File "../test.py", line 20, in <module>
_main()
File "../test.py", line 11, in _main
for event in i.event_gen(yield_nones=False):
File "/home/jvlarble/.local/lib/python3.6/site-packages/inotify/adapters.py", line 307, in event_gen
self._i.remove_watch(full_path, superficial=True)
File "/home/jvlarble/.local/lib/python3.6/site-packages/inotify/adapters.py", line 118, in remove_watch
self.remove_watch_with_id(wd)
File "/home/jvlarble/.local/lib/python3.6/site-packages/inotify/adapters.py", line 126, in remove_watch_with_id
inotify.calls.inotify_rm_watch(self.__inotify_fd, wd)
File "/home/jvlarble/.local/lib/python3.6/site-packages/inotify/calls.py", line 35, in _check_nonnegative
(result,))
inotify.calls.InotifyError: Call failed (should not be -1): (-1) ERRNO=(0)
Source
import inotify.adapters
def _main():
i = inotify.adapters.InotifyTree('.')
#i.add_watch('.')
#with open('/tmp/test_file', 'w'):
# pass
for event in i.event_gen(yield_nones=False):
(_, type_names, path, filename) = event
print("PATH=[{}] FILENAME=[{}] EVENT_TYPES={}".format(
path, filename, type_names))
if __name__ == '__main__':
_main()
Error
Source
Steps to reproduce: