scdl icon indicating copy to clipboard operation
scdl copied to clipboard

Track with mostly unicode character fails to download

Open flyingrub opened this issue 2 years ago β€’ 3 comments


Track nΒ°399
Downloading π™ˆπ˜Όπ™π™π™” π™ˆπ™…π™π˜Ώπ™€ - π™π™šπ™ π™£π™€ π˜Όπ™œπ™–π™žπ™£π™¨π™© 𝙒𝙖𝙧
Downloading the original file.
Traceback (most recent call last):
  File "/home/fly/.local/bin/scdl", line 11, in <module>
    load_entry_point('scdl==2.3.5', 'console_scripts', 'scdl')()
  File "/home/fly/.local/lib/python3.6/site-packages/scdl/scdl.py", line 229, in main
    download_url(client, **python_args)
  File "/home/fly/.local/lib/python3.6/site-packages/scdl/scdl.py", line 349, in download_url
    download_playlist(client, playlist, **kwargs)
  File "/home/fly/.local/lib/python3.6/site-packages/scdl/scdl.py", line 414, in download_playlist
    download_track(client, track, playlist_info, kwargs.get("strict_playlist"), **kwargs)
  File "/home/fly/.local/lib/python3.6/site-packages/scdl/scdl.py", line 610, in download_track
    filename, is_already_downloaded = download_original_file(client, track, title, playlist_info, **kwargs)
  File "/home/fly/.local/lib/python3.6/site-packages/scdl/scdl.py", line 487, in download_original_file
    filename += ext
TypeError: must be str, not NoneType

flyingrub avatar Mar 23 '22 17:03 flyingrub

While I'm not sure if it will fix it, you are on an older version of scdl. Also, I don't think it is the unicode characters not letting you download but the extension for the original file doesn't exist or smth. I have plenty of songs that are entirely unicode characters and they still downloaded fine, albeit, I didn't use the original file just the streams.

hunkyburrito avatar Apr 03 '22 15:04 hunkyburrito

You are probably using linux right ? This is happening on Windows Subsystem for Linux. Here is the link to the song : https://soundcloud.com/marty_mjude_mcfly/marty-mjude-tekno-against-war The original file is just a .wav

flyingrub avatar Apr 04 '22 09:04 flyingrub

Alright I found the issue. Without getting into the specifics, the filename scdl is getting is actually "SoundCloud Download" which has no extension, and when you don't use --original-name it tries to find the extension and add it to the end. For a temporary workaround you can either download with --original-name and fix the name yourself or use --no-original which gives the mp3 with the right name.

I believe I've found a fix for this, so if I can find the time, I'll make a PR.

hunkyburrito avatar Apr 05 '22 17:04 hunkyburrito