facebookresearch / DrQA

Reading Wikipedia to Answer Open-Domain Questions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

zjohn77 opened this issue · comments

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>'"

same issue

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

same issue

same issue

same issue. Any idea to solve it?

same issue

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