rakuri255 / UltraSinger

AI based tool to convert vocals lyrics and pitch from music to autogenerate Ultrastar Deluxe, Midi and notes. It automatic tapping, adding text, pitch vocals and creates karaoke files.
MIT License
265 stars 24 forks source link

Failing because of special characters in filename? #115

Open dwedman93 opened 9 months ago

dwedman93 commented 9 months ago

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 commented 9 months ago

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://