telegram_media_downloader icon indicating copy to clipboard operation
telegram_media_downloader copied to clipboard

[400 PEER_ID_INVALIDID]

Open rorybramley opened this issue 1 year ago • 1 comments

After typing in my phone number and the verification code, I get the following error:

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyrogram/methods/advanced/resolve_peer.py", line 83, in resolve_peer return await self.storage.get_peer_by_phone_number(peer_id) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyrogram/storage/sqlite_storage.py", line 173, in get_peer_by_phone_number raise KeyError(f"Phone number not found: {phone_number}") KeyError: 'Phone number not found: CHAT_ID'

Traceback (most recent call last): File "/Users/rory/Desktop/telegram_media_downloader/media_downloader.py", line 376, in main() File "/Users/rory/Desktop/telegram_media_downloader/media_downloader.py", line 360, in main updated_config = asyncio.get_event_loop().run_until_complete( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete return future.result() File "/Users/rory/Desktop/telegram_media_downloader/media_downloader.py", line 327, in begin_import async for message in messages_iter: # type: ignore File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyrogram/methods/messages/get_chat_history.py", line 113, in get_chat_history messages = await get_chunk( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyrogram/methods/messages/get_chat_history.py", line 42, in get_chunk peer=await client.resolve_peer(chat_id), File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyrogram/methods/advanced/resolve_peer.py", line 85, in resolve_peer raise PeerIdInvalid pyrogram.errors.exceptions.bad_request_400.PeerIdInvalid: Telegram says: [400 PEER_ID_INVALID] - The peer id being used is invalid or not known yet. Make sure you meet the peer before interacting with it

Any help with this? I know I have access to the channel.

rorybramley avatar Aug 11 '22 20:08 rorybramley

+1

AIRDOGE avatar Sep 06 '22 05:09 AIRDOGE

Access to this chat group or channel is prohibited. Maybe because of your ID, you were kicked out of the chat room. It may also be because the channel and chat group involved child pornography and other content, which was banned by telegram.

tsinit2001 avatar Nov 18 '22 22:11 tsinit2001

+1

童車變靈車,沒開到幼兒園,開到火葬場了。

tsinit2001 avatar Dec 02 '22 06:12 tsinit2001