Nekmo / telegram-upload

Upload and download files from Telegram up to 4 GiB using your account
MIT License
1.1k stars 238 forks source link

[Errno 29] Illegal seek , [Errno 5] Input/output error. Error while downloading #253

Open Revdep opened 7 months ago

Revdep commented 7 months ago

Description

When i try to download single/multiple files i randomly get this error and after that it stops to download all the files:

` File "/usr/local/lib/python3.10/dist-packages/telegram_upload/client/telegram_download_client.py", line 109, in _download_file r = f.write(chunk) OSError: [Errno 29] Illegal seek

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/bin/telegram-download", line 8, in sys.exit(download_cli()) File "/usr/local/lib/python3.10/dist-packages/telegram_upload/exceptions.py", line 68, in wrap return fn(*args, kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in call return self.main(args, kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke return __callback(args, kwargs) File "/usr/local/lib/python3.10/dist-packages/telegram_upload/management.py", line 231, in download client.downloadfiles(from, download_files, delete_on_success) File "/usr/local/lib/python3.10/dist-packages/telegram_upload/client/telegram_download_client.py", line 52, in download_files file_name = self.download_media(download_file.message, progress_callback=progress) File "/usr/local/lib/python3.10/dist-packages/telethon/sync.py", line 39, in syncified return loop.run_until_complete(coro) File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/usr/local/lib/python3.10/dist-packages/telethon/client/downloads.py", line 422, in download_media return await self._download_document( File "/usr/local/lib/python3.10/dist-packages/telethon/client/downloads.py", line 895, in _download_document result = await self._download_file( File "/usr/local/lib/python3.10/dist-packages/telegram_upload/client/telegram_download_client.py", line 126, in _download_file f.close() OSError: [Errno 5] Input/output error

`