stanfordnlp / stanfordnlp

[Deprecated] This library has been renamed to "Stanza". Latest development at: https://github.com/stanfordnlp/stanza

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot download the resource file

daisySSSS opened this issue · comments

commented

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

import stanfordnlp
stanfordnlp.download('id')

Error:

Downloading models for: id_gsd
Download location: /home/daisy/stanfordnlp_resources/id_gsd_models.zip
Traceback (most recent call last):
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
BlockingIOError: [Errno 11] Resource temporarily unavailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 387, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/http/client.py", line 1244, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/http/client.py", line 1290, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/http/client.py", line 1239, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/http/client.py", line 1026, in _send_output
    self.send(msg)
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/http/client.py", line 966, in send
    self.connect()
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/urllib3/connection.py", line 184, in connect
    conn = self._new_conn()
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/urllib3/connection.py", line 169, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f3b8ec54290>: Failed to establish a new connection: [Errno 11] Resource temporarily unavailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='nlp.stanford.edu', port=80): Max retries exceeded with url: /software/stanfordnlp_models/latest/id_gsd_models.zip (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3b8ec54290>: Failed to establish a new connection: [Errno 11] Resource temporarily unavailable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/stanfordnlp/utils/resources.py", line 137, in download
    confirm_if_exists=confirm_if_exists, force=force, version=version)
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/stanfordnlp/utils/resources.py", line 101, in download_ud_model
    r = requests.get(download_url, stream=True)
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/home/daisy/miniconda2/envs/chatbot-env/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='nlp.stanford.edu', port=80): Max retries exceeded with url: /software/stanfordnlp_models/latest/id_gsd_models.zip (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3b8ec54290>: Failed to establish a new connection: [Errno 11] Resource temporarily unavailable'))
>>>

The Stanford NLP cluster hosting model files is undergoing a scheduled maintenance right now, and we expect the servers to be back online within 24 hours!

By the way, further development of this project has moved to https://github.com/stanfordnlp/stanza and this repo is not being maintained actively any more.