hoechenberger / openneuro-py

A client for accessing OpenNeuro datasets, written in Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ENH: Handle another retry condition

larsoner opened this issue · comments

From CircleCI

https://app.circleci.com/pipelines/github/mne-tools/mne-bids-pipeline/3509/workflows/2bff367c-b0dc-46cc-b49b-cc69b484ae11/jobs/40953

  File "/home/circleci/python_env/lib/python3.10/site-packages/openneuro/download.py", line 483, in _download_files
    await asyncio.gather(*download_tasks)
  File "/home/circleci/python_env/lib/python3.10/site-packages/openneuro/download.py", line 328, in _download_file
    async with (
  File "/usr/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/home/circleci/python_env/lib/python3.10/site-packages/httpx/_client.py", line 1576, in stream
    response = await self.send(
  File "/home/circleci/python_env/lib/python3.10/site-packages/httpx/_client.py", line 1620, in send
    response = await self._send_handling_auth(
  File "/home/circleci/python_env/lib/python3.10/site-packages/httpx/_client.py", line 1648, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/home/circleci/python_env/lib/python3.10/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "/home/circleci/python_env/lib/python3.10/site-packages/httpx/_client.py", line 1722, in _send_single_request
    response = await transport.handle_async_request(request)
  File "/home/circleci/python_env/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
    with map_httpcore_exceptions():
  File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/home/circleci/python_env/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectError: [Errno -3] Temporary failure in name resolution

@hoechenberger worth adding this to the try/except that we retry?

I'd say yes!