Why can't Pyinotify watch a movie?

I would like Pyinotify to look at a template directory that has subfolders, but I get this error:

DIRECTORY /home/project/templates
[Pyinotify ERROR] add_watch: cannot watch /home/project/templates WD=-1
[Pyinotify ERROR] add_watch: cannot watch /home/project/templates/dir1 WD=-1
[Pyinotify ERROR] add_watch: cannot watch /home/project/templates/dir2 WD=-1
Waiting for stuff to happen...

I found answers, for example, using the Unicode directory name or other programs that use inotify, but each one is too specific.

What causes this error at all?

+5
source share
1 answer

Increase maximum number or hours:

sudo sysctl -n -w fs.inotify.max_user_watches=16384

Link: http://github.com/seb-m/pyinotify/wiki/Frequently-Asked-Questions

ASIDE

If you are looking for notification tools, try http://github.com/peterbe/python-gorun .

+9
source

All Articles