Why isn't Pyinotify able to watch a dir? - watch

I would like Pyinotify to watch a templates directory, which has subfolders, but I'm getting 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've found answers such as using a unicode directory name or using other programs which use inotify, but each is too specific.
What generally causes this error?

Increase the maximum number or watches:
sudo sysctl -n -w fs.inotify.max_user_watches=16384
Reference: http://github.com/seb-m/pyinotify/wiki/Frequently-Asked-Questions
ASIDE
If you're looking for notification tools, also try http://github.com/peterbe/python-gorun.

Related

Avahi fails in buildroot running intltool-update

I'm using an older buildroot 2016.11 and want to add DNS-SD by selecting the avahi package. Resulting in this error:
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^(.*)\${ <-- HERE ?([A-Z_]+)}?(.*)$/ at /home/user/nuvoton/nuc980/output/host/usr/bin/intltool-update line 1065.
checking for intltool >= 0.35.0... found
configure: error: Your intltool is too old. You need intltool 0.35.0 or later.
When searching I learned intltool should be enabed on the host, but I could not find how in menuconfig.
More searching told me it is related to some Perl update
I tried adding this patch http://lists.busybox.net/pipermail/buildroot/2017-June/194509.html but that also didn't help.
Can somebody steer me in the right direction how to solve this?
Using https://github.com/maximeh/buildroot/blob/master/package/intltool/0001-perl-5.26-compatibility.patch makes avahi build without problems.
In my case the build is getting too big, so I have to trim it down somehow...

ares-inspect luna-send command failed

I'm trying to debug my webos3 tv but I keep getting the following error:
ares-inspect --device web30 com.starz.lgtv.app_0.0.1_all.ipk
ares-inspect ERR! ares-inspect: Error: luna-send command failed (not exist)
It doesn't say anywhere in the documentation what luna-send is and it's closed source. I'm running on mac using the cli for webos. Is there anything I need to install?
Thanks
By trial and error, I found that you need to omit the version numbers for it to work:
ares-inspect --device web30 com.starz.lgtv.app --open
Don't forget the --open argument to open the inspector. :-)
The documentation doesn't explicitly say that you need to omit it but it is inferred in the demo code:
http://webostv.developer.lge.com/sdk/using-webos-tv-cli/debugging-web-applications-cli/
It's not about omitting version or removing suffixes from filenames. You should use the app id here, same as in your appinfo.json file.
ares-inspect [OPTION...] [--app|-a] APP_ID
APP_ID = ID of the app whose information is to be viewed using Web Inspector.
See http://webostv.developer.lge.com/sdk/tools/using-webos-tv-cli/ for reference.

Error in loading shared libraries

Hello all i am a student of bioinformatics and working on gromacs , while preparing for a simulation , i am getting this error
[root#compute-0-3 bin]# pdb2gmx -f model-317.pdb -water spce
pdb2gmx: error while loading shared libraries: libmpi.so.0: cannot open shared object file: No such file or directory**
How to solve this problem ??
You have to set the LD_LIBRARY_PATH you can check more on MPI - error loading shared libraries
Thanks & Regards,
Alok Thaker
I have found it useful to use strace -eopen COMMAND to see which files are actually searched for, and what return code open gives for each of them. For instance:
$ strace -eopen echo foo
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
foo
Use this trick to verify if it is just the path that is set wrong.
Also libmpi.so.0 may not be properly installed. You might have the file libmpi.so.0.1.2.3, and you need to either run ldconfig or manually make a symlink from libmpi.so.0 to libmpi.so.0.1.2.3. See more about why shared libraries might have different numbers appended to them here: http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html

fuseki load graph - s-put not found

I am trying to load a graph in fuseki. The server is working as it should.
But when I try s-put inside the fuseki folder it tells me s-put is not found?!
hdeus$ ls
DEPENDENCIES config.ttl s-delete
Data fuseki s-get
LICENSE fuseki-server s-head
NOTICE fuseki-server.bat s-post
ReleaseNotes.txt fuseki-server.jar s-put
config-examples.ttl fuseki_config.ttl s-query
config-inf-tdb.ttl log4j.properties s-update
config-tdb.ttl pages s-update-form
hdeus$ sudo ./s-put http://localhost:3030/ds/data default Data/books.ttl
sudo: ./s-put: command not found
Any idea what the problem might be? I tried copy/paste s-put from the ls output but stil nothing... I am working in mac os X
Is the file executable? If you unpacked from the zip file, you need to set the s-* executable. Also, you need ruby installed.

Default configuration in Play 2.0 causes IOException?

Is this a bug with the default configuration of Play 2.0? I have just installed Play 2.0 and when I create an application for the first time, I get this:
Error during sbt execution: java.io.IOException: Cannot write parent directory: Path(/home/hanxue/play/myFirstApp/app) of /home/hanxue/play/myFirstApp/app/views
The app subdirectory does not have write permissions:
hanxue#ubuntu-dev:~/play$ ls -l myFirstApp/
total 16
dr-xr-xr-x 2 hanxue hanxue 4096 2012-03-13 11:22 app
It also seems that the $PLAY/framework/sbt/boot/ directory need to be world-writable or otherwise play will throw an IOException about not being able to create /opt/play-2.0/framework/sbt/boot/sbt.boot.lock . Is this by design?
I solved it by giving it world-writable permission
chmod -R o+w /opt/play-2.0/framework/sbt/boot/
This is not a bug, it is just how sbt works(and play-2.0 uses sbt). Sbt downloads all necessary parts first time when its started, and default behavior of play is that all dependency go to same directory and this is place where you extracted play-2.0, so this directory needs write permissions. You will probably need write permissions on /opt/play-2.0/repository too.