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

Timeout exception thrown when tokenizing 'hello world' via CoreNLPTokenizer() #256

Open
zjohn77 opened this issue Jun 30, 2020 · 7 comments

Comments

@zjohn77
Copy link

zjohn77 commented Jun 30, 2020

Getting the error at the bottom here when I try to run the basic hello world script:

from drqa.tokenizers import CoreNLPTokenizer tok = CoreNLPTokenizer() tok.tokenize('hello world').words() # Should complete immediately

Based on:

My environment is: DrQA 0.1.0, python 3.6.10, MacOS 10.15.5

My error message looks like the following:

Traceback (most recent call last):
File "/Users/johnjung/opt/miniconda3/envs/python36env/lib/python3.6/site-packages/pexpect/expect.py", line 99, in expect_loop
incoming = spawn.read_nonblocking(spawn.maxread, timeout)
File "/Users/johnjung/opt/miniconda3/envs/python36env/lib/python3.6/site-packages/pexpect/pty_spawn.py", line 462, in read_nonblocking
raise TIMEOUT('Timeout exceeded.')
pexpect.exceptions.TIMEOUT: Timeout exceeded.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "my_drqa.py", line 2, in
tok = CoreNLPTokenizer()
File "/Users/johnjung/DrQA/drqa/tokenizers/corenlp_tokenizer.py", line 33, in init
self._launch()
File "/Users/johnjung/DrQA/drqa/tokenizers/corenlp_tokenizer.py", line 61, in _launch
self.corenlp.expect_exact('NLP>', searchwindowsize=100)
File "/Users/johnjung/opt/miniconda3/envs/python36env/lib/python3.6/site-packages/pexpect/spawnbase.py", line 390, in expect_exact
return exp.expect_loop(timeout)
File "/Users/johnjung/opt/miniconda3/envs/python36env/lib/python3.6/site-packages/pexpect/expect.py", line 107, in expect_loop
return self.timeout(e)
File "/Users/johnjung/opt/miniconda3/envs/python36env/lib/python3.6/site-packages/pexpect/expect.py", line 70, in timeout
raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x7fb0cf11e860>
command: /bin/bash
args: ['/bin/bash']
buffer (last 100 chars): b'm/kb/HT208050.\r\n\x1b[?1034hbash-3.2$ bash-3.2$ No Java runtime present, requesting install.\r\nbash-3.2$ '
before (last 100 chars): b'm/kb/HT208050.\r\n\x1b[?1034hbash-3.2$ bash-3.2$ No Java runtime present, requesting install.\r\nbash-3.2$ '
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 13006
child_fd: 6
closed: False
timeout: 60
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 100000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_string:
0: "b'NLP>'"

@Strider01
Copy link

same issue

@MikeyBeez
Copy link

I get the same timeout message when inputting process("who is albert einstein?")

@cdhx
Copy link

cdhx commented Apr 20, 2021

same issue

1 similar comment
@Zhaoxiaolistudy
Copy link

same issue

@ghost
Copy link

ghost commented Jul 20, 2021

same issue. Any idea to solve it?

@BayanIssa
Copy link

same issue

@Stxr
Copy link

Stxr commented Feb 14, 2023

#91 (comment) solve this problem.
you should set CLASSPATH correctly.

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

7 participants