OrfiTeam / OrpheusDL

608 stars 75 forks source link

Error after downloading artwork #4

Closed OctoCharm closed 2 years ago

OctoCharm commented 2 years ago
Traceback (most recent call last):
  File "%userprofile%\orpheusdl\orpheus.py", line 201, in <module>
    main()
  File "%userprofile%\orpheusdl\orpheus.py", line 196, in main
    orpheus_core_download(orpheus, media_to_download, tpm, sdm, path)
  File "%userprofile%\orpheusdl\orpheus\core.py", line 371, in orpheus_core_download
    downloader.download_album(media_id, extra_kwargs=media.extra_kwargs)
  File "%userprofile%\orpheusdl\orpheus\music_downloader.py", line 147, in download_album
    self.download_track(track_id, album_location=album_path, track_index=index, number_of_tracks=number_of_tracks, main_artist=artist_name, cover_temp_location=cover_temp_location, indent_level=indent_level+1, extra_kwargs=album_info.track_extra_kwargs)
  File "%userprofile%\orpheusdl\orpheus\music_downloader.py", line 369, in download_track
    f.write(lyrics_info.synced)
  File "%programfiles%\Python310\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 110-111: character maps to <undefined>
Dniel97 commented 2 years ago

Please provide more information such as:

  1. Which module are you using?
  2. Which URL are you using?
  3. Which OS are you using? I guess Windows?
OctoCharm commented 2 years ago
  1. https://github.com/Dniel97/orpheusdl-tidal
  2. https://tidal.com/browse/album/169166054
  3. yep, it's Windows

The first track was downloaded successfully, but the second gave me this error:

PS %userprofile%\orpheusdl> python orpheus.py https://tidal.com/browse/album/169166054

   ____             _                    _____  _
  / __ \           | |                  |  __ \| |
 | |  | |_ __ _ __ | |__   ___ _   _ ___| |  | | |
 | |  | | '__| '_ \| '_ \ / _ \ | | / __| |  | | |
 | |__| | |  | |_) | | | |  __/ |_| \__ \ |__| | |____
  \____/|_|  | .__/|_| |_|\___|\__,_|___/_____/|______|
             | |
             |_|

        Refreshing token successful
=== Downloading album STILL DREAMING (169166054) ===
        Artist: TOMORROW X TOGETHER (15159762)
        Year: 2021
        Number of tracks: 10
        Service: Tidal
        Downloading album cover

        Track 1/10
        === Downloading track Intro : DREAMING (169166055) ===
                Artists: TOMORROW X TOGETHER (15159762)
                Release year: 2021
                Codec: FLAC, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|███████████████████████████████████████████████████| 20/20 [00:02<00:00,  7.00it/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 169166055 downloaded ===

        Track 2/10
        === Downloading track Force (169166056) ===
                Artists: TOMORROW X TOGETHER (15159762)
                Release year: 2021
                Codec: FLAC, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|███████████████████████████████████████████████████| 62/62 [00:08<00:00,  7.18it/s]
                Downloading artwork
Traceback (most recent call last):
  File "%userprofile%\orpheusdl\orpheus.py", line 201, in <module>
    main()
  File "%userprofile%\orpheusdl\orpheus.py", line 196, in main
    orpheus_core_download(orpheus, media_to_download, tpm, sdm, path)
  File "%userprofile%\orpheusdl\orpheus\core.py", line 371, in orpheus_core_download
    downloader.download_album(media_id, extra_kwargs=media.extra_kwargs)
  File "%userprofile%\orpheusdl\orpheus\music_downloader.py", line 147, in download_album
    self.download_track(track_id, album_location=album_path, track_index=index, number_of_tracks=number_of_tracks, main_artist=artist_name, cover_temp_location=cover_temp_location, indent_level=indent_level+1, extra_kwargs=album_info.track_extra_kwargs)
  File "%userprofile%\orpheusdl\orpheus\music_downloader.py", line 369, in download_track
    f.write(lyrics_info.synced)
  File "%programfiles%\Python310\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 104-107: character maps to <undefined>
PS %userprofile%\orpheusdl>