telegram-cloud icon indicating copy to clipboard operation
telegram-cloud copied to clipboard

it shows Task was destroyed but it is pending! and exit

Open Mafhoom opened this issue 4 years ago • 3 comments

I used like this command in win10: e:\telegram_download\tgcloud -m download -n nima -u test -p "e:\telegram_download@test" -c ".pdf"

it worked perfectly but suddenly shows these and exited:

Traceback (most recent call last): File "e:\telegram_download\lib\runpy.py", line 194, in run_module_as_main return run_code(code, main_globals, None, File "e:\telegram_download\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "E:\telegram_download\Scripts\tgcloud.exe_main.py", line 7, in File "e:\telegram_download\lib\site-packages\telegramcloud_main.py", line 60, in cli client.loop.run_until_complete(main()) File "e:\telegram_download\lib\asyncio\base_events.py", line 616, in run_until_complete return future.result() File "e:\telegram_download\lib\site-packages\telegramcloud_main.py", line 50, in main await client.download_media(message, args.path) File "e:\telegram_download\lib\site-packages\telethon\client\downloads.py", line 367, in download_media return await self._download_document( File "e:\telegram_download\lib\site-packages\telethon\client\downloads.py", line 771, in _download_document result = await self.download_file( File "e:\telegram_download\lib\site-packages\telethon\client\downloads.py", line 467, in download_file async for chunk in self.iter_download( File "e:\telegram_download\lib\site-packages\telethon\requestiter.py", line 74, in anext if await self._load_next_chunk(): File "e:\telegram_download\lib\site-packages\telethon\client\downloads.py", line 61, in _load_next_chunk cur = await self._request() File "e:\telegram_download\lib\site-packages\telethon\client\downloads.py", line 71, in _request result = await self.client._call(self._sender, self.request) File "e:\telegram_download\lib\site-packages\telethon\client\users.py", line 77, in _call result = await future telethon.errors.rpcerrorlist.FileReferenceExpiredError: The file reference has expired and is no longer valid or it belongs to self-destructing media and cannot be resent (caused by GetFileRequest) Task was destroyed but it is pending! task: <Task pending name='Task-11' coro=<MTProtoSender._send_loop() running at e:\telegram_download\lib\site-packages\telethon\network\mtprotosender.py:422> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001E5F6B61040>()]>> Task was destroyed but it is pending! task: <Task pending name='Task-12' coro=<MTProtoSender._recv_loop() running at e:\telegram_download\lib\site-packages\telethon\network\mtprotosender.py:459> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001E5F6BBBA90>()]>> Task was destroyed but it is pending! task: <Task pending name='Task-9' coro=<Connection._send_loop() running at e:\telegram_download\lib\site-packages\telethon\network\connection\connection.py:159> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001E5F6B61130>()]>> Task was destroyed but it is pending! task: <Task pending name='Task-10' coro=<Connection._recv_loop() running at e:\telegram_download\lib\site-packages\telethon\network\connection\connection.py:177> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001E5F6BB6C10>()]>>

Mafhoom avatar Sep 27 '20 08:09 Mafhoom

The error is: The file reference has expired and is no longer valid or it belongs to self-destructing media and cannot be resent (caused by GetFileRequest) I have to test it by myself to find out what's wrong, may I know which channel are you trying to test?

iw4p avatar Sep 27 '20 09:09 iw4p

channel : @ketabxaneiranshenasi please add some kind of exceptions to continue if there are some errors because it stopped and I must download all files again

Mafhoom avatar Sep 27 '20 09:09 Mafhoom

Oh, I see. I'll check it.

iw4p avatar Sep 27 '20 09:09 iw4p