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

Files are so slow to download that File_Reference is running out of time #4341

Closed
3 tasks done
FreeM1ne opened this issue Apr 2, 2024 · 6 comments
Closed
3 tasks done

Comments

@FreeM1ne
Copy link

FreeM1ne commented Apr 2, 2024

Code that causes the issue

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

Expected behavior

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

Actual behavior

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

Traceback

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

Telethon version

last

Python version

3.11.5

Operating system (including distribution name and version)

Windows 10

Other details

No response

Checklist

  • The error is in the library's code, and not in my own.
  • I have searched for this issue before posting it and there isn't an open duplicate.
  • I ran pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip and triggered the bug in the latest version.
@FreeM1ne
Copy link
Author

FreeM1ne commented Apr 2, 2024

download speed does not exceed 0.3mb

@FreeM1ne
Copy link
Author

FreeM1ne commented Apr 2, 2024

I think we should add a "workers" parameter to specify the number of workers to download the file.

@Lonami Lonami closed this as completed in 26aa178 Apr 2, 2024
@Lonami
Copy link
Member

Lonami commented Apr 2, 2024

I don't have plans to complicate the download code further. Not in v1.

However, the above should refetch the message, if you're using message.download_media to download the file.

@FreeM1ne
Copy link
Author

FreeM1ne commented Apr 2, 2024

Yeah, I'm using message.download_media
but the error still appears

@Lonami
Copy link
Member

Lonami commented Apr 2, 2024

The above commit has not been released yet, though you could try pip3 install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip and see if it helped at all.

@FreeM1ne
Copy link
Author

Either way it's very slow, also, on importance I rate it 8/10
Telegram wouldn't be telegram if it didn't have files, it's not just chatting.

vanutp pushed a commit to vanutp/Telethon that referenced this issue Apr 22, 2024
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

2 participants