← All errors
high install

NoneType is not iterable (aiohttp)

Description

Bot crashes on startup or during HTTP requests with 'NoneType is not iterable' traceback from inside aiohttp.

Cause

aiohttp version 3.10+ changed internal API behaviour that discord.py-self 2.1.0 depends on. Installing aiohttp without pinning the version pulls the latest which is incompatible.

Fix

Pin aiohttp to >=3.10 in requirements.txt and reinstall. If still failing, downgrade to aiohttp==3.9.5 as a last resort.

Code change

Before
pip install aiohttp
After
pip install 'aiohttp>=3.10'