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

download_media(), the file size equals to 0 B #62

Open
3 tasks done
fivepe opened this issue May 17, 2024 · 1 comment
Open
3 tasks done

download_media(), the file size equals to 0 B #62

fivepe opened this issue May 17, 2024 · 1 comment

Comments

@fivepe
Copy link

fivepe commented May 17, 2024

Checklist

  • I am sure the error is coming from Pyrogram's code and not elsewhere
  • I have searched in the issue tracker for similar bug reports, including closed ones
  • I ran pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip and reproduced the issue using the latest development version

Description

When downloading photo or video, sometimes some files have a size of 0 or are incomplete after downloading.

Steps to reproduce

download photos, some photo is 0 size.
image

Code example

file = await app.download_media(msg, file_name=filename_temp, progress=progress, progress_args=(download_msg,))

Logs

[10] Retrying "upload.GetFile" due to: Request timed out
Request timed out
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/client.py", line 971, in get_file
    r = await session.invoke(
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/session/session.py", line 422, in invoke
    return await self.invoke(query, retries - 1, timeout)
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/session/session.py", line 422, in invoke
    return await self.invoke(query, retries - 1, timeout)
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/session/session.py", line 422, in invoke
    return await self.invoke(query, retries - 1, timeout)
  [Previous line repeated 7 more times]
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/session/session.py", line 412, in invoke
    raise e from None
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/session/session.py", line 399, in invoke
    return await self.send(query, timeout=timeout)
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/session/session.py", line 361, in send
    raise TimeoutError("Request timed out")
TimeoutError: Request timed out
@Yash126116
Copy link

Same error

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