Bug: ":stories" crashes with "TypeError: 'NoneType' object is not subscriptable" after successful login
Author: ritud632-delCreated Jul 22, 2026Updated Jul 26, 2026
Labelsbug
Environment
- Instaloader version: Latest release (up to date at the time of reporting)
- Python: 3.12
- Operating System: Windows 11
- Browser used for cookie import: Opera Stable (Also tried with firefox, librewolf)
- Opera installation: Standard installation (not Opera GX, not portable)
Command used
instaloader --load-cookies Opera --cookiefile "C:\Users\abird\AppData\Roaming\Opera Software\Opera Stable\Default\Network\Cookies" :storiesWhat happens
Instaloader successfully imports cookies and logs into Instagram:
Cookies loaded successfully from opera
<username> has been successfully logged in.
Next time use --login=<username> to reuse the same session.
Retrieving all visible stories...Immediately after that, it crashes with:
Traceback (most recent call last):
...
File "...instaloader.py", line 855, in download_stories
for i, user_story in enumerate(self.get_stories(userids), start=1):
File "...instaloader.py", line 811, in get_stories
userids = list(edge["node"]["id"] for edge in data["feed_reels_tray"]["edge_reels_tray_to_reel"]["edges"])
TypeError: 'NoneType' object is not subscriptable
The traceback indicates that "data["feed_reels_tray"]" is "None".Expected behavior
Instaloader should either:
- Download the visible stories from followed accounts, or
- Gracefully handle the case where "feed_reels_tray" is "null" instead of raising an uncaught "TypeError".
Additional information
- Cookie import succeeds.
- Login succeeds.
- I can access Instagram normally in Opera.
- I can see stories normally on instagram.com in the same Opera session.
- The Opera cookie database exists at:
C:\Users<username>\AppData\Roaming\Opera Software\Opera Stable\Default\Network\Cookies
- Instaloader successfully creates and saves its own session.
- The problem occurs every time I use ":stories".
Additional testing
I also tested downloading a public profile (e.g. "nasa"), and Instaloader was able to authenticate and download posts, although I occasionally saw transient GraphQL "403 Forbidden" retry messages before continuing.
This suggests that authentication and the saved session are working correctly, and the issue appears to be specific to the ":stories" retrieval path.
Source: instaloader/instaloader