Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

On Windows machines with Non-english locales, files with special characters in their name aren't being moved #25

Open
TFWol opened this issue Apr 10, 2018 · 7 comments
Labels

Comments

@TFWol
Copy link
Contributor

TFWol commented Apr 10, 2018

Files with dashes in their name aren't being moved since the dashes, and possibly other characters, are being removed from the file names themselves causing a mismatch.

Ex:
Error: File not found: 18 - An Example—Infrastructure.mp4
Filename in folder: 18 - An ExampleInfrastructure.mp4

Affected Courses:

@TFWol
Copy link
Contributor Author

TFWol commented Apr 10, 2018

I'm thinking instead of stripping out characters based on regex, we should have the save.py somehow store the names of the downloaded files into a list where move.py can match and move accordingly.
Just an idea, I'd have to do some reading to know where to start or if it's even worth the time though.

@ankitsejwal
Copy link
Owner

I'm not able to reproduce this error on MacOS either with python 2.x or 3.x
It may be a windows thing, I'll test it on windows soon.
Thanks for reporting it mate.

@TFWol TFWol changed the title Files with special characters in their name aren't being moved On Windows machines with Non-english locales, files with special characters in their name aren't being moved Apr 30, 2018
@ankitsejwal ankitsejwal added the bug label May 2, 2018
@anilgunesh
Copy link

I think this bug is also related to courses where the Author has a name/surname with special characters.

I am giving one example here:
[https://www.lynda.com/Career-Development-tutorials/Repairing-Your-Reputation/441832-2.html]

Traceback (most recent call last):
File "C:\Lyndor-master/run.py", line 127, in
main()
File "C:\Lyndor-master/run.py", line 33, in main
schedule_download(url)
File "C:\Lyndor-master/run.py", line 49, in schedule_download
download_course(url)
File "C:\Lyndor-master/run.py", line 92, in download_course
save.info_file(url, course_folder_path) # Gather information
File "C:\Lyndor-master\save.py", line 106, in info_file
message.write("Author Name", author_name)
File "C:\Lyndor-master\message.py", line 43, in write
sys.stdout.write(str(description) + '\t' + str(value) + '\n')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xeb' in position 10:
ordinal not in range(128)

@ankitsejwal
Copy link
Owner

Thanks for reporting it @anilgunesh. It should be fixed now, have a look.
Cheers.

@anilgunesh
Copy link

anilgunesh commented Jun 6, 2018 via email

@TFWol
Copy link
Contributor Author

TFWol commented Jun 9, 2018

Sorry I've been extremely busy, I can at least make a comment here and there. Just reporting for awareness my particular issue still persists.

@ankitsejwal
Copy link
Owner

sorry mate, I am not able to reproduce this bug as I don't have an access to a windows laptop. I'll test it a soon as possible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants