Menu

#47 Error when opening chats

closed
nobody
bug (44)
2025-03-13
2025-03-07
Anonymous
No

Originally created by: amolinae06

Describe the bug
When attempting to open instagram-cli I get the error mentioned below. I'm using an executable made by myself.

To Reproduce
Steps to reproduce the behavior:

  1. Run instagram-cli chat start.
  2. Wait a few seconds.
  3. Get the following error:

    Attempting to login with session...
    ╭──────────────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────────────╮
    │ in start:77 │
    │ │
    │ in start_chat:47 │
    │ │
    │ in wrapper:94 │
    │ │
    │ in init_chat:45 │
    │ │
    │ in main_loop:62 │
    │ │
    │ in with_loading_screen:33 │
    │ │
    │ in fetch_chat_data:54 │
    │ │
    │ in direct_threads:88 │
    │ │
    │ in direct_threads_chunk:153 │
    │ │
    │ in extract_direct_thread:288 │
    │ │
    │ in extract_user_short:195 │
    ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
    AttributeError: 'NoneType' object has no attribute 'get'
    [PYI-31784:ERROR] Failed to execute script 'cli' due to unhandled exception!

Expected behavior
Chats should open normally.

Screenshots
Image

Desktop (please complete the following information):

  • OS: Artix Linux x86_64
  • Version: Both1.2.8 and latest commit have this issue.

Related

Tickets: #63
Tickets: #94

Discussion

  • Anonymous

    Anonymous - 2025-03-07

    Originally posted by: supreme-gg-gg

    This seems to be an issue with instagrapi and how it handles Instagram API responses. It’s likely that a specific chat has missing fields in the response, which can happen since Instagram doesn’t have an official API. We’ll look into adding a wrapper to prevent these errors from breaking chat functionality, but it seems to be a very rare case.

    If you try searching and opening a specific chat (e.g. by username) and it works properly, it is probably a rare issue with loading message from one specific chat in the list.

     
  • Anonymous

    Anonymous - 2025-03-13

    Ticket changed by: supreme-gg-gg

    • status: open --> closed
     

Log in to post a comment.

Auth0 Logo