vitiko98 / qobuz-dl

A complete Lossless and Hi-Res music downloader for Qobuz
GNU General Public License v3.0
1.45k stars 192 forks source link

Error creating M3U file #232

Open GreenRabbits opened 1 year ago

GreenRabbits commented 1 year ago

I get this error when creating the M3U file for a playlist that I downloaded. I have seen that it can be related to utf-8 encoding, and the albums of some of the playlist's tracks contain special characters.

I have just installed Python 3.11.5 and I don't know how to fix this error. What should I do to avoid this issue ?

Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\Windows Eleven\AppData\Local\Programs\Python\Python311\Scripts\qobuz-dl.exe__main__.py", line 7, in File "C:\Users\Windows Eleven\AppData\Local\Programs\Python\Python311\Lib\site-packages\qobuz_dl\cli.py", line 176, in main _handle_commands(qobuz, arguments) File "C:\Users\Windows Eleven\AppData\Local\Programs\Python\Python311\Lib\site-packages\qobuz_dl\cli.py", line 83, in _handle_commands qobuz.download_list_of_urls(arguments.SOURCE) File "C:\Users\Windows Eleven\AppData\Local\Programs\Python\Python311\Lib\site-packages\qobuz_dl\core.py", line 180, in download_list_of_urls self.handle_url(url) File "C:\Users\Windows Eleven\AppData\Local\Programs\Python\Python311\Lib\site-packages\qobuz_dl\core.py", line 166, in handle_url make_m3u(new_path) File "C:\Users\Windows Eleven\AppData\Local\Programs\Python\Python311\Lib\site-packages\qobuz_dl\utils.py", line 73, in make_m3u pl.write("\n\n".join(track_list)) File "C:\Users\Windows Eleven\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'charmap' codec can't encode character '\u0393' in position 722: character maps to