-
-
Notifications
You must be signed in to change notification settings - Fork 161
Description
Describe the bug
AttributeError: module 'aiohttp' has no attribute 'ClientWSTimeout' when using aiohttp
3.10.11. The ClientWSTimeout attribute was removed from aiohttp in newer versions, causing
websocket connections to fail.
Complete error:
File "/usr/local/lib/python3.8/dist-packages/engineio/async_client.py", line 333, in _connect_websocket
File "/usr/local/lib/python3.8/dist-packages/aiohttp/init.py", line 260, in getattr
AttributeError: module aiohttp has no attribute ClientWSTimeout
To Reproduce
- Install aiohttp 3.10.11: pip install aiohttp==3.10.11
- Try to establish websocket connection using engineio async client
- Connection attempt fails with AttributeError
Expected behavior
Websocket connection should establish successfully with current aiohttp versions.
Logs
Failed to connect to https://example.com:5000
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/engineio/async_client.py", line 333, in _connect_websocket
File "/usr/local/lib/python3.8/dist-packages/aiohttp/init.py", line 260, in getattr
AttributeError: module aiohttp has no attribute ClientWSTimeout
(URL anonymized for privacy)
Additional context
- Python 3.8
- Workaround: Downgrading to aiohttp==3.8.6 resolves the issue
- ClientWSTimeout was deprecated and removed from aiohttp around v3.9+
- Need compatibility with current aiohttp versions or documented version constraints