Skip to content

I think is not working with new channels #6

@BrahianVT

Description

@BrahianVT

what could be the issue?


Login success! ID: 7639705950 | is_bot: True
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/site-packages/pyrogram/methods/advanced/resolve_peer.py", line 62, in resolve_peer
    return await self.storage.get_peer_by_id(peer_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/site-packages/pyrogram/storage/sqlite_storage.py", line 142, in get_peer_by_id
    raise KeyError(f"ID not found: {peer_id}")
KeyError: 'ID not found: -1002496706947'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.14/x64/bin/tgc", line 7, in <module>
    sys.exit(run())
             ^^^^^
  File "/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/site-packages/tgc/pyro/crawl.py", line 195, in run
    asyncio.get_event_loop().run_until_complete(run_app())
  File "/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/site-packages/tgc/pyro/crawl.py", line 177, in run_app
    await process_chat(int(export["chat_id"]), Path(export["path"]), export)
  File "/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/site-packages/tgc/pyro/crawl.py", line 137, in process_chat
    chat: Chat = await app.get_chat(chat_id)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/site-packages/pyrogram/methods/chats/get_chat.py", line 78, in get_chat
    peer = await self.resolve_peer(chat_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/site-packages/pyrogram/methods/advanced/resolve_peer.py", line 89, in resolve_peer
    peer_type = utils.get_peer_type(peer_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/site-packages/pyrogram/utils.py", line 246, in get_peer_type
    raise ValueError(f"Peer id invalid: {peer_id}")
ValueError: Peer id invalid: -1002496706947

-1002496706947 is a right id for a private channel and the bot has all the admin rights, 

also I tried with public channel, any one has faced something like this? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions