Dineshkarthik / telegram_media_downloader

Download media files from a telegram conversation/chat/channel up to 2GiB per file
MIT License
2.15k stars 363 forks source link

What am I doing wrong? First time downloading #426

Closed notjeremie closed 1 year ago

notjeremie commented 1 year ago

Describe the bug I don’t really know aha, I am trying to make it work but the log showed me something I do not understand..

To Reproduce Share the config: Please don't share your api_hash & api_id

chat_id: 1190245907
last_read_message_id: 0
media_types:
- video
file_formats:
  audio:
  - all
  document:
  - all
  video:
  - all

Python Version Python: 3.7.5

OS: Linux on seedbox: Ubuntu 18.04.6 LTS

Logs The confirmation code has been sent via Telegram app Enter confirmation code: 29344 ![193A9DAA-6F54-40FC-8FDD-AAACEEC61C29](https://user-images.githubusercontent.com/117147192/223037822-9fc48614-7131-490f-84f4-8f343fe8a153.jpeg) (05:31:26] INFO Started 16 HandlerTasks Traceback (ost recent call last): File " /home/user/.local/lib/python3.7/site-packages/pyrogram/methods/advanced/resolve_peer.py", line 62, in resolve_peer return await self.storage.get_peer _by_id(peer_id) File "/home/user/.local/lib/python3.77site-packages/pyrogram/storage/sqlite_storage.py",line 148, in get peer by id raise KeyError (f"ID not found: (peer_id)") Keybrror: D not found: 1190245907 During handling of the above exception, another exception occurred: Traceback (most recent call last): File " /home/user/.local/lib/python3.7/site-packages/pyrogram/methods/advanced/resolve_peer-py",line 123, in resolve _peer return await self.storage.get_peer_by_id(peer_id) File -home/user/.local/11b/python3.77site-packages/pyrogram/storage/sqlite_storage.py",line148,inget_peer_by_id raise KeyError (f"ID not found: {peer_ id)") KeyError: 'ID not found: 1190245907 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "media downloader.py", line 376, in <module> main ( ) File "media downloader.py", line 361, in main begin_import (config, pagination _limit=100) File "/us/lib/python3.7/asyncio/base events.py", line 579, in run until complete return future.result.) File "media downloader.py", line 327, in begin_ import asvnc for message in messages iter: a types ichore File " /home/user/.local/lib/python3.7/site-packages/pyrogram/methods/messages/get_chat_history.py", line 122, in get_chat_history reversesreverse File " /home/user/.local/lib/python3.7/site-packages/pyrogram/methods/messages/get_chat_history.py", line 42, in get_chunk peer=await client. resolve_peer (chat_id), File " /home/user/.local/lib/python3.7/site-packages/pyrogram/methods/advanced/resolve_peer.py", line 125, in resolve_peer auth.py: 82 connection.py: 56 connection.py:68 auth.py: 249 connection.py: 77 connection.py:56 connection.ov:68 session.py: 271 session.py: 131 session.py: 132 session.py: 133 session.py: 148 session.ov:249 dispatcher.py: 154 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 anteractina wats

tuminzee commented 1 year ago

I suppose the problem is with the chat_id, can you please confirm if it is a valid chat id?

Refer to Getting chat id section https://github.com/Dineshkarthik/telegram_media_downloader#configuration

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity in the past 45 days. It will be closed if no further activity occurs in the next 7 days. Thank you for your contributions.