Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot reload saved work #116

Open
lmunnis opened this issue Jan 4, 2020 · 1 comment
Open

Cannot reload saved work #116

lmunnis opened this issue Jan 4, 2020 · 1 comment

Comments

@lmunnis
Copy link

lmunnis commented Jan 4, 2020

I am running Vatic on Ubuntu 18.04 with python 2.7 using --offline. I was able to label a segment (ID=2) and save my work. Now, however, any time I try to reload the labeled segment (http://localhost/?id=2&hitId=offline), I'm getting the following in the apache error.log:

[Sat Jan 04 07:26:22.876003 2020] [wsgi:error] [pid 10302:tid 139952596031232] [remote 127.0.0.1:60972] mod_wsgi (pid=10302): Target WSGI script '/home/userid/Downloads/vatic/server.py' cannot be loaded as Python module.
[Sat Jan 04 07:26:22.876048 2020] [wsgi:error] [pid 10302:tid 139952596031232] [remote 127.0.0.1:60972] mod_wsgi (pid=10302): Exception occurred processing WSGI script '/home/userid/Downloads/vatic/server.py'.
[Sat Jan 04 07:26:22.876081 2020] [wsgi:error] [pid 10302:tid 139952596031232] [remote 127.0.0.1:60972] Traceback (most recent call last):
[Sat Jan 04 07:26:22.876111 2020] [wsgi:error] [pid 10302:tid 139952596031232] [remote 127.0.0.1:60972] File "/home/userid/Downloads/vatic/server.py", line 9, in
[Sat Jan 04 07:26:22.876214 2020] [wsgi:error] [pid 10302:tid 139952596031232] [remote 127.0.0.1:60972] from models import *
[Sat Jan 04 07:26:22.876235 2020] [wsgi:error] [pid 10302:tid 139952596031232] [remote 127.0.0.1:60972] File "/home/userid/Downloads/vatic/models.py", line 7, in
[Sat Jan 04 07:26:22.876341 2020] [wsgi:error] [pid 10302:tid 139952596031232] [remote 127.0.0.1:60972] import vision
[Sat Jan 04 07:26:22.876359 2020] [wsgi:error] [pid 10302:tid 139952596031232] [remote 127.0.0.1:60972] File "/usr/local/lib/python2.7/dist-packages/pyvision-0.3.1-py2.7-linux-x86_64.egg/vision/init.py", line 1, in
[Sat Jan 04 07:26:22.876403 2020] [wsgi:error] [pid 10302:tid 139952596031232] [remote 127.0.0.1:60972] from annotations import *
[Sat Jan 04 07:26:22.876420 2020] [wsgi:error] [pid 10302:tid 139952596031232] [remote 127.0.0.1:60972] File "init.pxd", line 155, in init vision.annotations (vision/annotations.c:9314)
[Sat Jan 04 07:26:22.876595 2020] [wsgi:error] [pid 10302:tid 139952596031232] [remote 127.0.0.1:60972] ImportError: No module named numpy

Not even sure why it's looking for numpy, since I traced this down to vatic/public/ui.js calling function ui_loadprevious --> vatic/public/server.py getboxesforjob(id). When I run server.py's getboxesforjob(id) locally, it works just fine, and doesn't even seem to use numpy.

Any help is much appreciated!

@lmunnis
Copy link
Author

lmunnis commented Jan 6, 2020

In case it helps anyone, for me this was caused by the "tuple" in getboxesforjob(id) somehow triggering numpy error (commented it out, ran fine, added it and it failed).

Numpy was installed in my home/userid/.local/lib/python2.7/site-packages directory with a+rx but the browser still wasn't seeing it - confirmed this by adding a "print sys.path" in getboxesforjob(id). So instead I put a symbolic link to my numpy directory in /usr/local/lib/python2.7/dist-packages, and then the labelled segment loaded with the previously drawn bounding boxes.

For good measure, I also added symlinks for pyscopg2 and scipy, since they were in the same place as numpy.

I think the morale of the story is to probably not install vatic in your home directory. Did see something from the mod_wsgi creator that said there may be problems being able to find things in the /home directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant