machinalis / iepy

Information Extraction in Python
BSD 3-Clause "New" or "Revised" License
906 stars 186 forks source link

Stanford-CoreNLP Location Confliction #67

Closed pjhampton closed 9 years ago

pjhampton commented 9 years ago

Before starting an iepy instance, I use a pyvenv environment and install iepy + dependancies. After successfully doing this, I upload a corpus and go to preprocess it using the command:

python bin/preprocess.py

...and I get the traceback:

Starting preprocessing step <iepy.preprocess.stanford_preprocess.StanfordPreprocess object at 0x103bfe160> Loading StanfordCoreNLP... Traceback (most recent call last): File "bin/preprocess.py", line 34, in pipeline.process_everything() File "/Users/pjhampton/Desktop/infoextract/lib/python3.4/site-packages/iepy/preprocess/pipeline.py", line 49, in process_everything self.process_step_in_batch(runner) File "/Users/pjhampton/Desktop/infoextract/lib/python3.4/site-packages/iepy/preprocess/pipeline.py", line 43, in process_step_in_batch runner(doc) File "/Users/pjhampton/Desktop/infoextract/lib/python3.4/site-packages/iepy/preprocess/stanford_preprocess.py", line 56, in call analysis = corenlp.get_analizer().analize(document.text) File "/Users/pjhampton/Desktop/infoextract/lib/python3.4/site-packages/iepy/preprocess/corenlp.py", line 21, in get_analizer _singleton.append(StanfordCoreNLP()) File "/Users/pjhampton/Desktop/infoextract/lib/python3.4/site-packages/iepy/preprocess/corenlp.py", line 38, in init stderr=subprocess.STDOUT File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/subprocess.py", line 858, in init restore_signals, start_new_session) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/subprocess.py", line 1456, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: '/Users/pjhampton/Library/Application Support/iepy/stanford-corenlp-full-2014-08-27/corenlp.sh'

However, the pwd is /Users/pjhampton/desktop/infoextract/proj where infoextract is the virtual environment.

j0hn commented 9 years ago

Hi, this sounds like a known issue with MacOS, see if this solves your problem: http://iepy.readthedocs.org/en/latest/troubleshooting.html#preprocess-not-running-under-macos

pjhampton commented 9 years ago

Thanks for your guidance!