Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async HTTP Error Loading Large Files into FROST #5

Open
C-Loftus opened this issue Oct 24, 2024 · 0 comments
Open

Async HTTP Error Loading Large Files into FROST #5

C-Loftus opened this issue Oct 24, 2024 · 0 comments

Comments

@C-Loftus
Copy link
Member

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 854, in _read_ready__data_received
    data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/httpcore-0.13.7-py3.9.egg/httpcore/_backends/anyio.py", line 60, in read
    return await self.stream.receive(n)
  File "/usr/local/lib/python3.9/site-packages/anyio-3.7.1-py3.9.egg/anyio/streams/tls.py", line 196, in receive
    data = await self._call_sslobject_method(self._ssl_object.read, max_bytes)
  File "/usr/local/lib/python3.9/site-packages/anyio-3.7.1-py3.9.egg/anyio/streams/tls.py", line 138, in _call_sslobject_method
    data = await self.transport_stream.receive()
  File "/usr/local/lib/python3.9/site-packages/anyio-3.7.1-py3.9.egg/anyio/_backends/_asyncio.py", line 1212, in receive
    raise self._protocol.exception
anyio.BrokenResourceError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/httpx-1.0.0b0-py3.9.egg/httpx/_transports/default.py", line 62, in map_httpcore_exceptions
    yield
  File "/usr/local/lib/python3.9/site-packages/httpx-1.0.0b0-py3.9.egg/httpx/_transports/default.py", line 201, in __aiter__
    async for part in self._httpcore_stream:
  File "/usr/local/lib/python3.9/site-packages/httpcore-0.13.7-py3.9.egg/httpcore/_async/connection_pool.py", line 57, in __aiter__
    async for chunk in self.stream:
  File "/usr/local/lib/python3.9/site-packages/httpcore-0.13.7-py3.9.egg/httpcore/_bytestreams.py", line 91, in __aiter__
    async for chunk in self._aiterator:
  File "/usr/local/lib/python3.9/site-packages/httpcore-0.13.7-py3.9.egg/httpcore/_async/http11.py", line 208, in _receive_response_data
    event = await self._receive_event(timeout)
  File "/usr/local/lib/python3.9/site-packages/httpcore-0.13.7-py3.9.egg/httpcore/_async/http11.py", line 225, in _receive_event
    data = await self.socket.read(self.READ_NUM_BYTES, timeout)
  File "/usr/local/lib/python3.9/site-packages/httpcore-0.13.7-py3.9.egg/httpcore/_backends/anyio.py", line 65, in read
    raise ReadError from exc
httpcore.ReadError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/wis2box", line 33, in <module>
    sys.exit(load_entry_point('wis2box==0.6.dev1', 'console_scripts', 'wis2box')())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/wis2box-0.6.dev1-py3.9.egg/wis2box/oregon/cli.py", line 19, in load
    load_data_into_frost(station, begin, end)
  File "/usr/local/lib/python3.9/site-packages/wis2box-0.6.dev1-py3.9.egg/wis2box/oregon/main.py", line 276, in load_data_into_frost
    asyncio.run(main())
  File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.9/site-packages/wis2box-0.6.dev1-py3.9.egg/wis2box/oregon/main.py", line 274, in main
    await builder.send()
  File "/usr/local/lib/python3.9/site-packages/wis2box-0.6.dev1-py3.9.egg/wis2box/oregon/main.py", line 233, in send
    await asyncio.gather(*upload_tasks)
  File "/usr/local/lib/python3.9/site-packages/wis2box-0.6.dev1-py3.9.egg/wis2box/oregon/main.py", line 201, in upload_observations
    async for observation_dataset in observation_list:
  File "/usr/local/lib/python3.9/site-packages/wis2box-0.6.dev1-py3.9.egg/wis2box/oregon/main.py", line 174, in _get_observations
    response = await session.get(tsv_url)
  File "/usr/local/lib/python3.9/site-packages/httpx-1.0.0b0-py3.9.egg/httpx/_client.py", line 1704, in get
    return await self.request(
  File "/usr/local/lib/python3.9/site-packages/httpx-1.0.0b0-py3.9.egg/httpx/_client.py", line 1483, in request
    response = await self.send(
  File "/usr/local/lib/python3.9/site-packages/httpx-1.0.0b0-py3.9.egg/httpx/_client.py", line 1585, in send
    raise exc
  File "/usr/local/lib/python3.9/site-packages/httpx-1.0.0b0-py3.9.egg/httpx/_client.py", line 1579, in send
    await response.aread()
  File "/usr/local/lib/python3.9/site-packages/httpx-1.0.0b0-py3.9.egg/httpx/_models.py", line 1660, in aread
    self._content = b"".join([part async for part in self.aiter_bytes()])
  File "/usr/local/lib/python3.9/site-packages/httpx-1.0.0b0-py3.9.egg/httpx/_models.py", line 1660, in <listcomp>
    self._content = b"".join([part async for part in self.aiter_bytes()])
  File "/usr/local/lib/python3.9/site-packages/httpx-1.0.0b0-py3.9.egg/httpx/_models.py", line 1676, in aiter_bytes
    async for raw_bytes in self.aiter_raw():

File "/usr/local/lib/python3.9/site-packages/httpx-1.0.0b0-py3.9.egg/httpx/_models.py", line 1730, in aiter_raw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant