zotify-dev / zotify

A fast and customizable music and podcast downloader.
zlib License
1.23k stars 95 forks source link

Failed fetching audio key! #186

Open Cameron1391 opened 3 months ago

Cameron1391 commented 3 months ago

Hello. This software has been working perfect for me up until today. I get multiple errors trying to download albums and tracks. "Failed fetching audio key!

Failed fetching audio key - gid: 34a47982845a47808079a3c77396e6ae, fileId: f50977596f4be8ce0e3f918d51009daef606fb9c

        [∙∙∙] Preparing download... Traceback (most recent call last):
  File "C:\ProgramData\anaconda3\Lib\site-packages\zotify\track.py", line 224, in download_track
    stream = Zotify.get_content_stream(track, Zotify.DOWNLOAD_QUALITY)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\zotify\zotify.py", line 53, in get_content_stream
    return cls.SESSION.content_feeder().load(content_id, VorbisOnlyAudioQuality(quality), False, None)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\librespot\audio\__init__.py", line 739, in load
    return self.load_track(playable_id, audio_quality_picker, preload,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\librespot\audio\__init__.py", line 800, in load_track
    return self.load_stream(file, track, None, preload, halt_listener)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\librespot\audio\__init__.py", line 754, in load_stream
    return CdnFeedHelper.load_track(self.__session, track, file,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\librespot\audio\__init__.py", line 339, in load_track
    key = session.audio_key().get_audio_key(track.gid, file.file_id)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\librespot\audio\__init__.py", line 277, in get_audio_key
    return self.get_audio_key(gid, file_id, False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\librespot\audio\__init__.py", line 278, in get_audio_key
    raise RuntimeError(
RuntimeError: Failed fetching audio key! gid: 34a47982845a47808079a3c77396e6ae, fileId: f50977596f4be8ce0e3f918d51009daef606fb9c

This now happens on full albums and individual tracks. I haven't touched or changed anything. Does anyone know what the problem is. Thanks.

kikomoth commented 1 month ago

Another thing I noticed that if I received the error for a certain track from a playlist I'd stop my download and try to call that track by itself. If it kept giving me the error I'd just actually start playing the song in Spotify and it would then download just fine. Could be a coincidence, but I've been able to do this many times now.

lolo83560 commented 1 month ago

I also have cases where my script spits out an "audio key error" but still the track gets downloaded OK.