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

Failing because of special characters in filename? #115

Open
dwedman93 opened this issue Dec 31, 2023 · 1 comment
Open

Failing because of special characters in filename? #115

dwedman93 opened this issue Dec 31, 2023 · 1 comment

Comments

@dwedman93
Copy link

dwedman93 commented Dec 31, 2023

I suspect that the filenames are not sanitized enough?

Running with following parameters
['--force_cpu','True', '-i' ,'https://www.youtube.com/watch?v=k1BneeJTDcU,k1BneeJTDcU', '--disable_karaoke', 'True']
results in following traceback:


Traceback (most recent call last):
  File "d:\\Other Games\\Ultrastar\\Python\\UltraSinger\\src\\Ultrasinger.py", line 984, in <module>
    main(sys.argv[1:])
  File "d:\\Other Games\\Ultrastar\\Python\\UltraSinger\\src\\Ultrasinger.py", line 883, in main
    run()
  File "d:\\Other Games\\Ultrastar\\Python\\UltraSinger\\src\\Ultrasinger.py", line 326, in run
    ) = download_from_youtube()
  File "d:\\Other Games\\Ultrastar\\Python\\UltraSinger\\src\\Ultrasinger.py", line 769, in download_from_youtube
    download_youtube_thumbnail(
  File "d:\\Other Games\\Ultrastar\\Python\\UltraSinger\\src\\modules\\Audio\\youtube.py", line 52, in download_youtube_thumbnail
    download_and_convert_thumbnail(ydl_opts, url, clear_filename, output_path)
  File "d:\\Other Games\\Ultrastar\\Python\\UltraSinger\\src\\modules\\Audio\\youtube.py", line 66, in download_and_convert_thumbnail
    image.save(image_path, "JPEG")
  File "d:\\Other Games\\Ultrastar\\Python\\UltraSinger\\.venv\\lib\\site-packages\\PIL\\Image.py", line 2410, in save
    fp = builtins.open(filename, "w+b")
FileNotFoundError: [Errno 2] No such file or directory: \'D:\\\\Other Games\\\\Ultrastar\\\\Python\\\\UltraSinger\\\\output\\\\Welcome to the Internet  -  Bo Burnham (from Inside \\\\Welcome to the Internet  -  Bo Burnham (from Inside  [CO].jpg\

The log looks a little bit different, because I catch it from subprocesses.run() and put it straight into the logger (binary mode). So \\ equals \
In future I will decode it correctly....maybe :)

Other Songs work just fine.

Have a nice new years eve!

@rakuri255
Copy link
Owner

Are you in windows?
Windows has problems if the path is too long. Please try this again if you make the output direct on C://

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