subzeroid / instagrapi

🔥 The fastest and powerful Python library for Instagram Private API 2024
https://hikerapi.com/p/bkXQlaVe
MIT License
4.4k stars 689 forks source link

[BUG] 'NoneType' object has no attribute 'get' #2023

Open havij202025 opened 2 months ago

havij202025 commented 2 months ago

hi guys. when i get direct messages "self._cl.direct_threads(amount=3)", show me this error "'NoneType' object has no attribute 'get'" please help me.

GrayHatZone commented 1 month ago

i got same error with latest version of library

OlivierPaquien commented 3 weeks ago

Hi guys, i got same error, i fixed it by changing a line in instagrapi/extractors.py (function extract_direct_thread) : if "inviter" in data: became if "inviter" in data and data["inviter"] is not None:

@subzeroid should I do a PR to fix it ?