我希望Pyinotify查看一个模板目录,其中包含子文件夹,但我得到了以下错误:
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...我已经找到了答案,例如使用unicode目录名或使用其他使用inotify的程序,但每个程序都过于具体。
是什么导致了这个错误?
发布于 2010-10-02 21:07:49
增加最大数量或多个手表:
sudo sysctl -n -w fs.inotify.max_user_watches=16384参考资料:http://github.com/seb-m/pyinotify/wiki/Frequently-Asked-Questions
撇开
如果您正在寻找通知工具,也可以尝试http://github.com/peterbe/python-gorun。
https://stackoverflow.com/questions/3827275
复制相似问题