mirror of
https://github.com/kokarare1212/librespot-python.git
synced 2026-04-25 00:25:49 +03:00
[GH-ISSUE #276] [BUG] Failed fetching audio key! gid #48
Labels
No labels
bug
dependencies
duplicate
enhancement
invalid
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot-python-kokarare1212#48
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Masterolic on GitHub (Jul 7, 2024).
Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/276
Traceback (most recent call last):
File "/root/Spotify-downloa-bot/mbot/plugins/Spotify.py", line 166, in spotify_dl
await create_task(episode_down(item , item_name, randomdir , Mbot , message, get_prem))
File "/root/Spotify-downloa-bot/mbot/utils/SpotDL.py", line 97, in episode_down
randomfile = await create_task(download_file(session, episode_id, randomdir, get_prem))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/Spotify-downloa-bot/mbot/utils/SpotDL.py", line 58, in download_file
stream = session.content_feeder().load(episode_id, VorbisOnlyAudioQuality(AudioQuality.HIGH), False, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/librespot/audio/init.py", line 742, in load
return self.load_episode(playable_id, audio_quality_picker,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/librespot/audio/init.py", line 780, in load_episode
return self.load_stream(file, None, episode, preload, halt_listener)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/librespot/audio/init.py", line 756, in load_stream
return CdnFeedHelper.load_episode(self.__session, episode, file,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/librespot/audio/init.py", line 391, in load_episode
key = session.audio_key().get_audio_key(episode.gid, file.file_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/librespot/audio/init.py", line 277, in get_audio_key
return self.get_audio_key(gid, file_id, False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/librespot/audio/init.py", line 278, in get_audio_key
raise RuntimeError(
RuntimeError: Failed fetching audio key! gid: ef41ab6ee4495ebb9a4a8e9593699e6c, fileId: 051faa3f4b7b38a1687bd7f3ba2a6f7d0236bf28
Item_,type = Episode
@kokarare1212 commented on GitHub (Jul 7, 2024):
Generally, you are trying to load 320 kbps music on a non-premium account or region-locked.
@pdtan commented on GitHub (Aug 30, 2024):
I got this error with Audio key error, code: 2
Account premium, if retry, it may work again. So it's not region-locked.
first try:
success in 2nd try:
@Masterolic commented on GitHub (Aug 30, 2024):
Yes buddy i too facing same issues:)
@pdtan commented on GitHub (Sep 4, 2024):
seems problem is about rate limit, checkout here
I switched to fetch audio key from seektables & mp4 format
@Masterolic commented on GitHub (Sep 5, 2024):
Fetching from seektables also has the rate limit issue right?
@pdtan commented on GitHub (Sep 5, 2024):
Not yet. Still in testing
@Masterolic commented on GitHub (Sep 5, 2024):
Could you please share the repo which support seektables
@pdtan commented on GitHub (Sep 5, 2024):
@Masterolic I'm using this
@Masterolic commented on GitHub (Sep 5, 2024):
Thank you
https://github.com/KagChi/librespot-python
Support seektables seems like that also has limits after certain time
@wolkenschieber commented on GitHub (Sep 8, 2024):
Any idea about the limit? For me the error appears at random, even with sequential track processing.
@Masterolic commented on GitHub (Sep 9, 2024):
For me around 10 to 15 is the maximum then it goes for awhile
@KagChi commented on GitHub (Oct 7, 2024):
Hey, did you got it working with the repo? 🤔
@Masterolic commented on GitHub (Oct 7, 2024):
No buddy it wont as 404 raise from seektables seems like its a cdn so generate when requested but dont know how to request
Purchasing family package and creating 6 account and sharing the premium and using multiple account to generate link works fine
@KagChi commented on GitHub (Oct 7, 2024):
seektables only works on aac format which is need wvd files as far i know
@abdullahrahimoon commented on GitHub (Jun 10, 2025):
Hello, anyone finds the solution?
@staniel359 commented on GitHub (Oct 28, 2025):
@kokarare1212 How are available countries checked exactly?
Because sometimes file data may return no countries at all, which means audio is not country-restricted.
In this case will the check be performed?