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

pexpect.exceptions.EOF: End Of File (EOF). Exception style platform. #34

Open
nekulin opened this issue Nov 19, 2015 · 14 comments
Open

Comments

@nekulin
Copy link

nekulin commented Nov 19, 2015

python corenlp/corenlp.py -H ip -p 3456
Traceback (most recent call last):
  File "corenlp/corenlp.py", line 592, in <module>
    main()
  File "corenlp/corenlp.py", line 580, in main
    nlp = StanfordCoreNLP(options.corenlp, properties=options.properties, serving=True)
  File "corenlp/corenlp.py", line 435, in __init__
    self._spawn_corenlp()
  File "corenlp/corenlp.py", line 424, in _spawn_corenlp
    self.corenlp.expect("\nNLP> ")
  File "/usr/local/lib/python2.7/dist-packages/pexpect/spawnbase.py", line 315, in expect
    timeout, searchwindowsize, async)
  File "/usr/local/lib/python2.7/dist-packages/pexpect/spawnbase.py", line 339, in expect_list
    return exp.expect_loop(timeout)
  File "/usr/local/lib/python2.7/dist-packages/pexpect/expect.py", line 102, in expect_loop
    return self.eof(e)
  File "/usr/local/lib/python2.7/dist-packages/pexpect/expect.py", line 49, in eof
    raise EOF(msg)
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
<pexpect.pty_spawn.spawn object at 0x7ff999081510>
command: /usr/bin/java
args: ['/usr/bin/java', '-Xmx3g', '-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/xom.jar:stanford-corenlp-full-2014-08-27/joda-time.jar:stanford-corenlp-full-2014-08-27/jollyday.jar:stanford-corenlp-full-2014-08-27/ejml-0.23.jar', 'edu.stanford.nlp.pipeline.StanfordCoreNLP', '-props', '/root/corenlp-python/corenlp/default.properties']
searcher: None
buffer (last 100 chars): ''
before (last 100 chars): ' ner\r\nLoading classifier from edu/stanford/nlp/models/ner/english.all.3class.distsim.crf.ser.gz ... '
after: <class 'pexpect.exceptions.EOF'>
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 5804
child_fd: 6
closed: False
timeout: 60
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 8192
ignorecase: False
searchwindowsize: 80
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
@reginold
Copy link

I also met this problem,can you help me how to solve it please.

@rgtjf
Copy link

rgtjf commented Dec 24, 2015

may be you should use the version 3.4.1 stanford-corenlp-full-2014-08-27.zip [http://nlp.stanford.edu/software/stanford-corenlp-full-2014-08-27.zip]

@treml05
Copy link

treml05 commented Jan 15, 2016

I use the version 3.4.1 stanford-corenlp-full-2014-08-27.zip
but got the same problem...

@Priya22
Copy link

Priya22 commented Feb 22, 2016

I got the error with the latest release (3.6.0), but worked when I used 3.4.1 instead.

@aviatorBeijing
Copy link

Do these people even test their package before release to github?

@tuhinjubcse
Copy link

Facing same issue .
File "corenlp.py", line 257, in
nlp = StanfordCoreNLP()
File "corenlp.py", line 176, in init
self.corenlp.expect("done.", timeout=200) # Loading PCFG (~3sec)
File "/Library/Python/2.7/site-packages/pexpect/spawnbase.py", line 321, in expect
timeout, searchwindowsize, async)
File "/Library/Python/2.7/site-packages/pexpect/spawnbase.py", line 345, in expect_list
return exp.expect_loop(timeout)
File "/Library/Python/2.7/site-packages/pexpect/expect.py", line 105, in expect_loop
return self.eof(e)
File "/Library/Python/2.7/site-packages/pexpect/expect.py", line 50, in eof
raise EOF(msg)
pexpect.exceptions.EOF: End Of File (EOF). Empty string style platform.
<pexpect.pty_spawn.spawn object at 0x1098a3b10>
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: 3091
child_fd: 5
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.")

@ioana-blue
Copy link

I had the same problem. Installing Oracle java 8 solved the problem for me.

@StatguyUser
Copy link

StatguyUser commented Apr 26, 2018

@ioana-blue i am using ubuntu and java 8, still i have the same error message. My java is


java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

@owiofwm2i
Copy link

same issue,anyone solve it?

@meggie-wong
Copy link

Same problem. I am using macos and java10. Could someone tell me how to solve it?

@JohnnyLim
Copy link

I found that the file default.properties wasn't in my project repo, and I added this file to the project. Then the problem was solved.

@kkac26
Copy link

kkac26 commented Mar 11, 2020

Works with Oracle java 8 on Ubuntu 18.04:

openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3-18.04-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)

Doesn't work with Java 11!

@1033020837
Copy link

May it is the memory size too small...

@mohamc2022
Copy link

use openjdk version "1.8.0_92" worked for me.

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