Commit de0ec23
committed
beacon: fix AttributeError by using aiohttp.ClientTimeout throughout
Traceback (most recent call last):
File "/home/lukas/Documents/git/web3.py/test-script.py", line 33, in <module>
loop.run_until_complete(main())
File "/usr/lib64/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/lukas/Documents/git/web3.py/test-script.py", line 22, in main
validator = await beacon.get_validator(str(validator_id))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lukas/Documents/git/web3.py/web3/beacon/async_beacon.py", line 114, in get_validator
return await self._async_make_get_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lukas/Documents/git/web3.py/web3/beacon/async_beacon.py", line 77, in _async_make_get_request
return await self._request_session_manager.async_json_make_get_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lukas/Documents/git/web3.py/web3/_utils/http_session_manager.py", line 248, in async_json_make_get_request
response = await self.async_get_response_from_get_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lukas/Documents/git/web3.py/web3/_utils/http_session_manager.py", line 239, in async_get_response_from_get_request
session = await self.async_cache_and_return_session(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lukas/Documents/git/web3.py/web3/_utils/http_session_manager.py", line 228, in async_cache_and_return_session
request_timeout.total or DEFAULT_HTTP_TIMEOUT + 0.1,
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'float' object has no attribute 'total'
Signed-off-by: Lukas Rusak <[email protected]>1 parent abeed70 commit de0ec23
2 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
67 | | - | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
65 | | - | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| |||
0 commit comments