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

Temp file is exist after download_media failed #378

Open
mrb0098 opened this issue Mar 19, 2020 · 2 comments
Open

Temp file is exist after download_media failed #378

mrb0098 opened this issue Mar 19, 2020 · 2 comments

Comments

@mrb0098
Copy link

@mrb0098 mrb0098 commented Mar 19, 2020

Hi
i use this version of pyrogram to create a download bot on my personal vps .
when download_media function is failed (because flood error or some else ) temp files are created by bot in /tmp folder not removed :(

python version : 3.7.7

@delivrance
Copy link
Member

@delivrance delivrance commented Mar 19, 2020

@mrb0098 Hi. Both sync and async variants use the same approach when dealing with temporary downloaded files. I guess Pyrogram lacks some cleanup code in the exception branch. We will investigate this, thanks.

@mrb0098
Copy link
Author

@mrb0098 mrb0098 commented Mar 20, 2020

@mrb0098 Hi. Both sync and async variants use the same approach when dealing with temporary downloaded files. I guess Pyrogram lacks some cleanup code in the exception branch. We will investigate this, thanks.

how can i handle this exceptions ?
i use try block for download_media but i think its not work :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.