Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading multiple file causes error #252

Open
Prisoner2-6-7 opened this issue Mar 23, 2024 · 1 comment
Open

Downloading multiple file causes error #252

Prisoner2-6-7 opened this issue Mar 23, 2024 · 1 comment

Comments

@Prisoner2-6-7
Copy link

Prisoner2-6-7 commented Mar 23, 2024

edout (caused by GetFileRequest)                                                                                                    
Telegram is having internal issues TimedOutError: RPCError -503: Timedout (caused by GetFileRequest)                                                                                                                                                                                                                                                                                                                                
Traceback (most recent call last):                                                                                                  
  File "/root/.local/bin/telegram-download", line 8, in <module>                                                                    
    sys.exit(download_cli())                                                                                                        
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telegram_upload/exceptions.py", line 68, in wrap                                                                                                                                      
    return fn(*args, **kwargs)                                                                                                      
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/click/core.py", line 1157, in __call__                                                                                                                                                
    return self.main(*args, **kwargs)                                                                                               
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/click/core.py", line 1078, in main                                                                                                                                                    
    rv = self.invoke(ctx)                                                                                                           
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/click/core.py", line 1434, in invoke                                                                                                                                                  
    return ctx.invoke(self.callback, **ctx.params)                                                                                  
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/click/core.py", line 783, in invoke                                                                                                                                                   
    return __callback(*args, **kwargs)                                                                                              
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telegram_upload/management.py", line 231, in download                                                                                                                                 
    client.download_files(from_, download_files, delete_on_success)                                                                 
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-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 "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telethon/sync.py", line 39, in syncified                                                                                                                                              
    return loop.run_until_complete(coro)                                                                                            
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete                                                 
    return future.result()                                                                                                          
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telethon/client/downloads.py", line 422, in download_media                                                                                                                            
    return await self._download_document(                                                                                           
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telethon/client/downloads.py", line 895, in _download_document                                                                                                                        
    result = await self._download_file(                                                                                             
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telegram_upload/client/telegram_download_client.py", line 104, in _download_file                                                                                                      
    chunk = b''.join(filter(bool, [task.result() for task in tasks]))                                                               
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telegram_upload/client/telegram_download_client.py", line 104, in <listcomp>                                                                                                          
    chunk = b''.join(filter(bool, [task.result() for task in tasks]))                                                               
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telegram_upload/_compat.py", line 63, in anext                                                                                                                                        
    return await iterator.__anext__()                                                                                               
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telethon/requestiter.py", line 74, in __anext__                                                                                                                                       
    if await self._load_next_chunk():                                                                                               
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telethon/client/downloads.py", line 66, in _load_next_chunk                                                                                                                           
    cur = await self._request()                                                                                                     
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telethon/client/downloads.py", line 76, in _request                                                                                                                                   
    result = await self.client._call(self._sender, self.request)                                                                    
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telethon/client/users.py", line 87, 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 exception was never retrieved                                                                                                  
future: <Task finished name='Task-20368' coro=<anext() done, defined at /root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telegram_upload/_compat.py:14> exception=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)')>                                                                                                                                                                          
Traceback (most recent call last):                                                                                                  
  File "/root/.local/share/pipx/venvs/telegram-upload/lib/python3.9/site-packages/telegram_upload/_compat.py", line 63, in anext                                                                                                                                        
    return await iterator.__anext__()                                                                                               ```
@Prisoner2-6-7
Copy link
Author

after the error it just gets stuck
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant