machinalis / iepy

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

download-3rd-party-data #113

Closed JianyuZhao7 closed 7 years ago

JianyuZhao7 commented 7 years ago

When I command " iepy --download-third-party-data", sth strange happens just like the following. I succeed this command on another ubuntu server a few days and the pre-set is just the same. So could anyone tell me what's wrong? Thanks a lot.

(env34)ubuntu@ubuntu-desktop:~/iepy$ iepy --download-third-party-data Downloading punkt tokenizer ^CTraceback (most recent call last): File "/home/ubuntu/iepy/.virtualenvs/env34/bin/iepy", line 9, in load_entry_point('iepy==0.9.6', 'console_scripts', 'iepy')() File "/home/ubuntu/iepy/.virtualenvs/env34/lib/python3.4/site-packages/iepy/instantiation/command_line.py", line 41, in execute_from_command_line download_third_party_data(lang) File "/home/ubuntu/iepy/.virtualenvs/env34/lib/python3.4/site-packages/iepy/instantiation/command_line.py", line 50, in download_third_party_data nltk.download("punkt") File "/home/ubuntu/iepy/.virtualenvs/env34/lib/python3.4/site-packages/nltk/downloader.py", line 664, in download for msg in self.incr_download(info_or_id, download_dir, force): File "/home/ubuntu/iepy/.virtualenvs/env34/lib/python3.4/site-packages/nltk/downloader.py", line 534, in incr_download try: info = self._info_or_id(info_or_id) File "/home/ubuntu/iepy/.virtualenvs/env34/lib/python3.4/site-packages/nltk/downloader.py", line 508, in _info_or_id return self.info(info_or_id) File "/home/ubuntu/iepy/.virtualenvs/env34/lib/python3.4/site-packages/nltk/downloader.py", line 875, in info self._update_index() File "/home/ubuntu/iepy/.virtualenvs/env34/lib/python3.4/site-packages/nltk/downloader.py", line 825, in _update_index ElementTree.parse(compat.urlopen(self._url)).getroot()) File "/usr/lib/python3.4/urllib/request.py", line 161, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.4/urllib/request.py", line 463, in open response = self._open(req, data) File "/usr/lib/python3.4/urllib/request.py", line 481, in _open '_open', req) File "/usr/lib/python3.4/urllib/request.py", line 441, in _call_chain result = func(*args) File "/usr/lib/python3.4/urllib/request.py", line 1225, in https_open context=self._context, check_hostname=self._check_hostname) File "/usr/lib/python3.4/urllib/request.py", line 1182, in do_open h.request(req.get_method(), req.selector, req.data, headers) File "/usr/lib/python3.4/http/client.py", line 1088, in request self._send_request(method, url, body, headers) File "/usr/lib/python3.4/http/client.py", line 1126, in _send_request self.endheaders(body) File "/usr/lib/python3.4/http/client.py", line 1084, in endheaders self._send_output(message_body) File "/usr/lib/python3.4/http/client.py", line 922, in _send_output self.send(msg) File "/usr/lib/python3.4/http/client.py", line 857, in send self.connect() File "/usr/lib/python3.4/http/client.py", line 1231, in connect server_hostname=server_hostname) File "/usr/lib/python3.4/ssl.py", line 365, in wrap_socket _context=self) File "/usr/lib/python3.4/ssl.py", line 601, in init self.do_handshake() File "/usr/lib/python3.4/ssl.py", line 828, in do_handshake self._sslobj.do_handshake() KeyboardInterrupt (env34)ubuntu@ubuntu-desktop:~/iepy$

JianyuZhao7 commented 7 years ago

what's more, if I don't interrupt the process , finally it will show like this: image

j0hn commented 7 years ago

For some reason you can't connect to the server where the files live, you can try to do it manually by downloading the following files and unziping them in ~/.config/iepy

http://nlp.stanford.edu/software/stanford-postagger-2014-01-04.zip http://nlp.stanford.edu/software/stanford-corenlp-full-2015-04-20.zip http://nlp.stanford.edu/software/stanford-ner-2014-01-04.zip

either that or try again, might have been a net issue of that moment