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

AttributeError: 'NoneType' object has no attribute 'call_soon' when using upload-voucher #20

Open
nbtm-sh opened this issue May 14, 2024 · 1 comment

Comments

@nbtm-sh
Copy link

nbtm-sh commented May 14, 2024

Hello,

I'm testing this package for its viability on our cluster and ran into an issue when uploading to a voucher token. Please see the following command that I ran.

filesender --base-url https://filesender.aarnet.edu.au/rest.php upload-voucher /home/nglades/tmp/x.sif --guest-token 3e5b828b-309f-4de0-9686-d2d208f24444 --email "[email protected]" --verbose

I am using Python 3.11.2. The following output is what I see after running the command:

  + Exception Group Traceback (most recent call last):
  |   File "/home/nglades/tmp/filesender/filesender/bin/filesender", line 8, in <module>
  |     sys.exit(app())
  |              ^^^^^
  |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/typer/main.py", line 326, in __call__
  |     raise e
  |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/typer/main.py", line 309, in __call__
  |     return get_command(self)(*args, **kwargs)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
  |     return self.main(*args, **kwargs)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/typer/core.py", line 723, in main
  |     return _main(
  |            ^^^^^^
  |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/typer/core.py", line 193, in _main
  |     rv = self.invoke(ctx)
  |          ^^^^^^^^^^^^^^^^
  |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
  |     return _process_result(sub_ctx.command.invoke(sub_ctx))
  |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
  |     return ctx.invoke(self.callback, **ctx.params)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/click/core.py", line 783, in invoke
  |     return __callback(*args, **kwargs)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/typer/main.py", line 692, in wrapper
  |     return callback(**use_params)
  |            ^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/main.py", line 20, in wrapper
  |     return run(f(*args, **kwargs))
  |            ^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/config/binaries/python/3.11.2/lib/python3.11/asyncio/runners.py", line 190, in run
  |     return runner.run(main)
  |            ^^^^^^^^^^^^^^^^
  |   File "/config/binaries/python/3.11.2/lib/python3.11/asyncio/runners.py", line 118, in run
  |     return self._loop.run_until_complete(task)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/config/binaries/python/3.11.2/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
  |     return future.result()
  |            ^^^^^^^^^^^^^^^
  |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/main.py", line 130, in upload_voucher
  |     result: Transfer = await client.upload_workflow(files, {"from": email, "recipients": []})
  |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/api.py", line 366, in upload_workflow
  |     async with TaskGroup() as tg:
  |   File "/config/binaries/python/3.11.2/lib/python3.11/asyncio/taskgroups.py", line 133, in __aexit__
  |     raise me from None
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Exception Group Traceback (most recent call last):
    |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/api.py", line 387, in upload_complete
    |     await self.upload_file(
    |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/api.py", line 203, in upload_file
    |     async with TaskGroup() as tg:
    |   File "/config/binaries/python/3.11.2/lib/python3.11/asyncio/taskgroups.py", line 133, in __aexit__
    |     raise me from None
    | ExceptionGroup: unhandled errors in a TaskGroup (5 sub-exceptions)
    +-+---------------- 1 ----------------
      | Traceback (most recent call last):
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/api.py", line 223, in _upload_chunk
      |     return await self._sign_send(self.http_client.build_request(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/api.py", line 118, in _sign_send
      |     res = await self.http_client.send(request)
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1661, in send
      |     response = await self._send_handling_auth(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1689, in _send_handling_auth
      |     response = await self._send_handling_redirects(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1726, in _send_handling_redirects
      |     response = await self._send_single_request(request)
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1763, in _send_single_request
      |     response = await transport.handle_async_request(request)
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_transports/default.py", line 373, in handle_async_request
      |     resp = await self._pool.handle_async_request(req)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 216, in handle_async_request
      |     raise exc from None
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 196, in handle_async_request
      |     response = await connection.handle_async_request(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request
      |     return await self._connection.handle_async_request(request)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 143, in handle_async_request
      |     raise exc
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 113, in handle_async_request
      |     ) = await self._receive_response_headers(**kwargs)
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 186, in _receive_response_headers
      |     event = await self._receive_event(timeout=timeout)
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 224, in _receive_event
      |     data = await self._network_stream.read(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 35, in read
      |     return await self._stream.receive(max_bytes=max_bytes)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/anyio/streams/tls.py", line 205, in receive
      |     data = await self._call_sslobject_method(self._ssl_object.read, max_bytes)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/anyio/streams/tls.py", line 140, in _call_sslobject_method
      |     result = func(*args)
      |              ^^^^^^^^^^^
      |   File "/config/binaries/python/3.11.2/lib/python3.11/ssl.py", line 921, in read
      |     v = self._sslobj.read(len)
      |         ^^^^^^^^^^^^^^^^^^^^^^
      | ssl.SSLError: [SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac (_ssl.c:2546)
      +---------------- 2 ----------------
      | Traceback (most recent call last):
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/api.py", line 223, in _upload_chunk
      |     return await self._sign_send(self.http_client.build_request(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/api.py", line 118, in _sign_send
      |     res = await self.http_client.send(request)
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1661, in send
      |     response = await self._send_handling_auth(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1689, in _send_handling_auth
      |     response = await self._send_handling_redirects(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1726, in _send_handling_redirects
      |     response = await self._send_single_request(request)
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1763, in _send_single_request
      |     response = await transport.handle_async_request(request)
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_transports/default.py", line 373, in handle_async_request
      |     resp = await self._pool.handle_async_request(req)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 216, in handle_async_request
      |     raise exc from None
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 196, in handle_async_request
      |     response = await connection.handle_async_request(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request
      |     return await self._connection.handle_async_request(request)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 142, in handle_async_request
      |     await self._response_closed()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 257, in _response_closed
      |     await self.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 265, in aclose
      |     await self._network_stream.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 55, in aclose
      |     await self._stream.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/anyio/streams/tls.py", line 202, in aclose
      |     await self.transport_stream.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1193, in aclose
      |     self._transport.abort()
      |   File "/config/binaries/python/3.11.2/lib/python3.11/asyncio/selector_events.py", line 819, in abort
      |     self._force_close(None)
      |   File "/config/binaries/python/3.11.2/lib/python3.11/asyncio/selector_events.py", line 870, in _force_close
      |     self._loop.call_soon(self._call_connection_lost, exc)
      |     ^^^^^^^^^^^^^^^^^^^^
      | AttributeError: 'NoneType' object has no attribute 'call_soon'
      +---------------- 3 ----------------
      | Traceback (most recent call last):
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/api.py", line 223, in _upload_chunk
      |     return await self._sign_send(self.http_client.build_request(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/api.py", line 118, in _sign_send
      |     res = await self.http_client.send(request)
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1661, in send
      |     response = await self._send_handling_auth(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1689, in _send_handling_auth
      |     response = await self._send_handling_redirects(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1726, in _send_handling_redirects
      |     response = await self._send_single_request(request)
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1763, in _send_single_request
      |     response = await transport.handle_async_request(request)
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_transports/default.py", line 373, in handle_async_request
      |     resp = await self._pool.handle_async_request(req)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 216, in handle_async_request
      |     raise exc from None
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 196, in handle_async_request
      |     response = await connection.handle_async_request(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request
      |     return await self._connection.handle_async_request(request)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 142, in handle_async_request
      |     await self._response_closed()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 257, in _response_closed
      |     await self.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 265, in aclose
      |     await self._network_stream.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 55, in aclose
      |     await self._stream.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/anyio/streams/tls.py", line 202, in aclose
      |     await self.transport_stream.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1193, in aclose
      |     self._transport.abort()
      |   File "/config/binaries/python/3.11.2/lib/python3.11/asyncio/selector_events.py", line 819, in abort
      |     self._force_close(None)
      |   File "/config/binaries/python/3.11.2/lib/python3.11/asyncio/selector_events.py", line 870, in _force_close
      |     self._loop.call_soon(self._call_connection_lost, exc)
      |     ^^^^^^^^^^^^^^^^^^^^
      | AttributeError: 'NoneType' object has no attribute 'call_soon'
      +---------------- 4 ----------------
      | Traceback (most recent call last):
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/api.py", line 223, in _upload_chunk
      |     return await self._sign_send(self.http_client.build_request(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/api.py", line 118, in _sign_send
      |     res = await self.http_client.send(request)
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1661, in send
      |     response = await self._send_handling_auth(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1689, in _send_handling_auth
      |     response = await self._send_handling_redirects(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1726, in _send_handling_redirects
      |     response = await self._send_single_request(request)
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1763, in _send_single_request
      |     response = await transport.handle_async_request(request)
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_transports/default.py", line 373, in handle_async_request
      |     resp = await self._pool.handle_async_request(req)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 216, in handle_async_request
      |     raise exc from None
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 196, in handle_async_request
      |     response = await connection.handle_async_request(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request
      |     return await self._connection.handle_async_request(request)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 142, in handle_async_request
      |     await self._response_closed()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 257, in _response_closed
      |     await self.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 265, in aclose
      |     await self._network_stream.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 55, in aclose
      |     await self._stream.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/anyio/streams/tls.py", line 202, in aclose
      |     await self.transport_stream.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1193, in aclose
      |     self._transport.abort()
      |   File "/config/binaries/python/3.11.2/lib/python3.11/asyncio/selector_events.py", line 819, in abort
      |     self._force_close(None)
      |   File "/config/binaries/python/3.11.2/lib/python3.11/asyncio/selector_events.py", line 870, in _force_close
      |     self._loop.call_soon(self._call_connection_lost, exc)
      |     ^^^^^^^^^^^^^^^^^^^^
      | AttributeError: 'NoneType' object has no attribute 'call_soon'
      +---------------- 5 ----------------
      | Traceback (most recent call last):
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/api.py", line 223, in _upload_chunk
      |     return await self._sign_send(self.http_client.build_request(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/filesender/api.py", line 118, in _sign_send
      |     res = await self.http_client.send(request)
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1661, in send
      |     response = await self._send_handling_auth(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1689, in _send_handling_auth
      |     response = await self._send_handling_redirects(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1726, in _send_handling_redirects
      |     response = await self._send_single_request(request)
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_client.py", line 1763, in _send_single_request
      |     response = await transport.handle_async_request(request)
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpx/_transports/default.py", line 373, in handle_async_request
      |     resp = await self._pool.handle_async_request(req)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 216, in handle_async_request
      |     raise exc from None
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 196, in handle_async_request
      |     response = await connection.handle_async_request(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request
      |     return await self._connection.handle_async_request(request)
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 142, in handle_async_request
      |     await self._response_closed()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 257, in _response_closed
      |     await self.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_async/http11.py", line 265, in aclose
      |     await self._network_stream.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 55, in aclose
      |     await self._stream.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/anyio/streams/tls.py", line 202, in aclose
      |     await self.transport_stream.aclose()
      |   File "/home/nglades/tmp/filesender/filesender/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1193, in aclose
      |     self._transport.abort()
      |   File "/config/binaries/python/3.11.2/lib/python3.11/asyncio/selector_events.py", line 819, in abort
      |     self._force_close(None)
      |   File "/config/binaries/python/3.11.2/lib/python3.11/asyncio/selector_events.py", line 870, in _force_close
      |     self._loop.call_soon(self._call_connection_lost, exc)
      |     ^^^^^^^^^^^^^^^^^^^^
      | AttributeError: 'NoneType' object has no attribute 'call_soon'
      +------------------------------------
@multimeric
Copy link
Member

Hi Nathan,

I think the underlying error is SSL related. With async applications such as this, it often gets buried under a lot of other mess:

      | ssl.SSLError: [SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac (_ssl.c:2546)

Do you also get this error with regular curl calls? Also, have you tried a simpler filesender command such as server-info?

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

2 participants