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

Telethon 'download_media' downloads all files apart from 7z which are always corupt #4559

Open
3 tasks done
githubuser422 opened this issue Feb 14, 2025 · 2 comments
Open
3 tasks done

Comments

@githubuser422
Copy link

Code that causes the issue

file_path = await client.download_media(event.message, download_folder)

Expected behavior

I have a very basic download script that sits there watching for any posts in any channel my profile has joined. If the post contains and media etc, the script downloads to the download location specified.

Actual behavior

The script works as it should apart from where the file to download is a 7z in which the file gets downloaded, appears to be of the right size but is always corrupt (ERRORS: Unexpected end of archive). All other files download without a problem, including other archives (zip, tar etc)

Traceback

There are no errors provided - telethon appears to download the file

Telethon version

1.38.1

Python version

3.12.3

Operating system (including distribution name and version)

Ubuntu 24.04.2 LTS

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.
@Lonami
Copy link
Member

Lonami commented Feb 14, 2025

Telethon doesn't care what the files are. I'll need access to a faulty file before I have any chance at fixing this at https://t.me/Lonami (please link this issue so I know who you are).

@githubuser422
Copy link
Author

Yup - I know Telethon doesn't care thats what has been bugging me over the last week or so this has been happening!
It has been working in the past as well and its been the last few weeks - not sure if there is anything new on Telegrams side that would mess with 7z even.
Will get one across to you as soon as I can.

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