-
-
Notifications
You must be signed in to change notification settings - Fork 369
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 with ':' in name fail to download on Windows #266
Comments
@jkctech thanks for reporting and the clear issue description and fix. Is it possible for you run the same in python 3.9 without your fix and see if the same issue is still happening? |
@jkctech can you confirm if this issue still exists with the new version of the telegram media downloader? |
Hey, sorry for the delay! I think it has been fixed but I am not 100% sure, I made a fresh install of your software and I am now getting a lot of timeout errors: After completion, I had 55 files that were not downloaded. After running your program for a second time, using the id's added to the config, to make sure it was not a connection issue, the same 55 files were not downloaded. I made the change I previously did on the older version as well on this newer one just for a test, (Lines 178 & 193 this time) and the same 55 files are missing so I presume this issue is fixed and I am running into another issue? 😂 I have been trying consistently using a fresh session and fresh install but the same files are missing all the times so I think this issue can be marked as resolved, thankyou for your work 💯 |
Now I am looking at it, I am missing the folders for voice and video notes and they don't seem to be downloaded at all... It might be that the problem is still somehow relevant and thus these exact files are skipped? They are enabled in the config but no folders showed up while they did on the previous version on the same exact chat |
@jkctech the file download error should be fixed now |
On Windows, filenames cannot contain the character ':' (Colon).
When running the downloader, all downloads for "video_note" failed since they are named using a date AND a timestamp.
E.g.
C:\\telegram_media_downloader\\video_note\\video_note_2022-05-01T11:18:31.mp4
To Reproduce
Run the downloaded under Windows and on a chat with video notes.
Python Version
Python 3.10.2
OS:
Windows 10
Logs
Fix
I managed to "fix" the issue by force, replacing the
:
character on output filenames to an underscore.This however broke the complete path under windows since 'C:' gets replaced by 'C_' but it's a quick workaround and proves to me the sole issue is the colon in the filename, but this bug should be handled a little better than I am doing now 🙃
I made the following change in
media_downloader.py
:becomes
(2 changes on lines 188 and 194)
If you want I can make a better fix for this issue and make a PR
The text was updated successfully, but these errors were encountered: