dasmith / stanford-corenlp-python

Python wrapper for Stanford CoreNLP tools v3.4.1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while launching the server, i.e. running the command python corenlp.py

mihirsaxena opened this issue · comments

This is the error:
Traceback (most recent call last):
File "", line 1, in
File "corenlp.py", line 176, in init
self.corenlp.expect("done.", timeout=200) # Loading PCFG (~3sec)
File "/Users/mihir.saxena/virtualenvironment/my_new_project/lib/python2.7/site-packages/pexpect/spawnbase.py", line 327, in expect
timeout, searchwindowsize, async_)
File "/Users/mihir.saxena/virtualenvironment/my_new_project/lib/python2.7/site-packages/pexpect/spawnbase.py", line 355, in expect_list
return exp.expect_loop(timeout)
File "/Users/mihir.saxena/virtualenvironment/my_new_project/lib/python2.7/site-packages/pexpect/expect.py", line 102, in expect_loop
return self.eof(e)
File "/Users/mihir.saxena/virtualenvironment/my_new_project/lib/python2.7/site-packages/pexpect/expect.py", line 49, in eof
raise EOF(msg)
pexpect.exceptions.EOF: End Of File (EOF). Empty string style platform.
<pexpect.pty_spawn.spawn object at 0x10ca092d0>
command: /usr/bin/java
args: ['/usr/bin/java', '-Xmx1800m', '-cp', './stanford-corenlp-full-2014-08-27/stanford-corenlp-3.4.1.jar:./stanford-corenlp-full-2014-08-27/stanford-corenlp-3.4.1-models.jar:./stanford-corenlp-full-2014-08-27/joda-time.jar:./stanford-corenlp-full-2014-08-27/xom.jar:./stanford-corenlp-full-2014-08-27/jollyday.jar', 'edu.stanford.nlp.pipeline.StanfordCoreNLP', '-props', 'default.properties']
buffer (last 100 chars): ''
before (last 100 chars): 'aders.java:185)\r\n\tat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)\r\n\t... 34 more\r\n'
after: <class 'pexpect.exceptions.EOF'>
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 46580
child_fd: 6
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile("done.")

I have verified that all the jar files are of the same version that is specified in the corenlp.py code, earlier I had used a latest version of it and appropriately updated it in corenlp.py, in either cases, getting the same error. Not able to figure it out, kindly look into this and please suggest a solution.

Got the solution. I was running Java jdk version 9 on my system. Remove it and install jdk 8.