huner icon indicating copy to clipboard operation
huner copied to clipboard

Request timeout for BioInfer dataset

Open serenalotreck opened this issue 1 year ago • 0 comments

When running python download_files.py, I get the following error:

Traceback (most recent call last):
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/urllib3/connection.py", line 175, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 710, in urlopen
    chunked=chunked,
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/urllib3/connection.py", line 244, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/opt/software/Python/3.7.2-GCCcore-6.4.0/lib/python3.7/http/client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/opt/software/Python/3.7.2-GCCcore-6.4.0/lib/python3.7/http/client.py", line 1275, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/opt/software/Python/3.7.2-GCCcore-6.4.0/lib/python3.7/http/client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/opt/software/Python/3.7.2-GCCcore-6.4.0/lib/python3.7/http/client.py", line 1016, in _send_output
    self.send(msg)
  File "/opt/software/Python/3.7.2-GCCcore-6.4.0/lib/python3.7/http/client.py", line 956, in send
    self.connect()
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/urllib3/connection.py", line 187, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x2ab4f4514588>: Failed to establish a new connection: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/requests/adapters.py", line 499, in send
    timeout=timeout,
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 788, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='mars.cs.utu.fi', port=80): Max retries exceeded with url: /BioInfer/files/BioInfer_corpus_1.1.1.zip (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x2ab4f4514588>: Failed to establish a new connection: [Errno 110] Connection timed out'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "download_files.py", line 44, in <module>
    resp = requests.get('http://mars.cs.utu.fi/BioInfer/files/BioInfer_corpus_1.1.1.zip')
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/mnt/home/lotrecks/.local/lib/python3.7/site-packages/requests/adapters.py", line 565, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='mars.cs.utu.fi', port=80): Max retries exceeded with url: /BioInfer/files/BioInfer_corpus_1.1.1.zip (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x2ab4f4514588>: Failed to establish a new connection: [Errno 110] Connection timed out'))

I've tried accessing the link directly in my browser, and I get a timeout error there as well.

Do you know of another place to get the data in a format that works with your bioinfer_to_conll.py script? I've only been able to find the dataset on huggingface, and while I could do the format conversion myself, it would save a lot of time to use code that's already been written.

Thanks! Serena

serenalotreck avatar Apr 25 '23 21:04 serenalotreck