telegram_media_downloader icon indicating copy to clipboard operation
telegram_media_downloader copied to clipboard

TimeoutError

Open lolcakes69 opened this issue 1 year ago • 0 comments

Describe the bug TimeoutError will cause many files to show up as 0 bytes. I used Rhillip's patch from this post that will delete any files this happens to then add the message ID to IDs to retry https://github.com/Dineshkarthik/telegram_media_downloader/issues/306#issuecomment-1209373452

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

chat_id: telegram_chat_id
last_read_message_id: 0
media_types:
- audio
- photo
- video
- document
- voice
file_formats:
  audio:
  - all
  document:
  - all
  video:
  - all

Python Version Python: 3.10

OS: The OS and its version: W10 Pro 21H2

Logs

           ERROR                                                                                                                                              client.py:979
                    Traceback (most recent call last):
                      File
                    "C:\Users\VALKYRIE\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-pac
                    kages\pyrogram\client.py", line 848, in get_file
                        r = await session.invoke(
                      File
                    "C:\Users\VALKYRIE\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-pac
                    kages\pyrogram\session\session.py", line 381, in invoke
                        return await self.invoke(query, retries - 1, timeout)
                      File
                    "C:\Users\VALKYRIE\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-pac
                    kages\pyrogram\session\session.py", line 381, in invoke
                        return await self.invoke(query, retries - 1, timeout)
                      File
                    "C:\Users\VALKYRIE\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-pac
                    kages\pyrogram\session\session.py", line 381, in invoke
                        return await self.invoke(query, retries - 1, timeout)
                      [Previous line repeated 2 more times]
                      File
                    "C:\Users\VALKYRIE\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-pac
                    kages\pyrogram\session\session.py", line 374, in invoke
                        raise e from None
                      File
                    "C:\Users\VALKYRIE\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-pac
                    kages\pyrogram\session\session.py", line 361, in invoke
                        return await self.send(query, timeout=timeout)
                      File
                    "C:\Users\VALKYRIE\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-pac
                    kages\pyrogram\session\session.py", line 326, in send
                        raise TimeoutError
                    TimeoutError

Additional context I'm using v2.0.1 since v2.0.2 only fixed a proxy issue. But when starting to use v2.0.1 I did do as requested to uninstall Pyrogram then reinstall with pip3 install -r requirements.txt

lolcakes69 avatar Aug 13 '22 03:08 lolcakes69