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

error when starting server #34

Closed
Heavy02011 opened this issue Nov 1, 2016 · 4 comments
Closed

error when starting server #34

Heavy02011 opened this issue Nov 1, 2016 · 4 comments
Assignees

Comments

@Heavy02011
Copy link

Heavy02011 commented Nov 1, 2016

  1. data in /LSTMVis/lstmdata/05childbook
  2. starting server with....
    root@b6d19b96355f:/LSTMVis# python server.py -dir /LSTMVis/lstmdata/05childbook
    File "server.py", line 267
    print args
    ^
    SyntaxError: Missing parentheses in call to 'print'

Any ideas what I'm missing? @HendrikStrobelt Thx!

@HendrikStrobelt
Copy link
Owner

Hi hello,
It looks like you are using Python 3? LSTMVis is currently implemented in Python 2.7

Does that solve the problem ?

@Heavy02011
Copy link
Author

Heavy02011 commented Nov 2, 2016

Hi, thx.
I retried with python. 2.7.12

root@6905b7f28104:/LSTMVis# python server.py -dir /LSTMVis/lstmdata/05childbook
Traceback (most recent call last):
File "server.py", line 12, in
from lstmdata.data_handler import LSTMDataHandler
ImportError: No module named lstmdata.data_handler
root@6905b7f28104:/LSTMVis# python --version
Python 2.7.12

and my data directory looks like

root@6905b7f28104:/LSTMVis/lstmdata/05childbook# ls -l
total 2341600
-rw-r--r-- 1 root root 4339944 May 1 2016 embeddings.h5
drwxr-xr-x 16 root root 544 Jun 24 19:22 indexdir
-rw-r--r-- 1 root root 1160 Jun 24 19:25 lstm.yml
-rw-r--r-- 1 root root 862 Jun 20 18:28 lstm.yml~
-rw-r--r-- 1 root root 149 Jun 21 17:41 ner.dict
-rw-r--r-- 1 root root 10177440 Jun 21 17:41 ner.h5
-rw-r--r-- 1 root root 104 Jun 21 17:41 pos.dict
-rw-r--r-- 1 root root 10177440 Jun 21 17:41 pos.h5
-rw-r--r-- 1 root root 177972944 May 1 2016 saliency.h5
-rw-r--r-- 1 root root 2035042144 May 1 2016 states.h5
-rw-r--r-- 1 root root 101699744 May 1 2016 top_k.h5
-rw-r--r-- 1 root root 40705088 May 1 2016 train.h5
-rw-r--r-- 1 root root 17353344 May 1 2016 weights.h5
-rw-r--r-- 1 root root 298500 May 1 2016 words.dict

It seems a very obvious point I'm overlooking

@Heavy02011
Copy link
Author

my dockerfile: https://github.com/Heavy02011/LSTMvis-docker

@sebastianGehrmann
Copy link
Collaborator

can you try running export PYTHONPATH='.' before starting the server? This is a common error that occurs when your python path does not point to the directory you are currently in.

In code, you can also check this by printing your sys.path.

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

3 participants