mirror of
https://github.com/kokarare1212/librespot-python.git
synced 2026-04-25 08:35:49 +03:00
[GH-ISSUE #125] [BUG]AudioQuality Error #14
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#14
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 @Pranavprana on GitHub (Apr 26, 2022).
Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/125
File "C:\Python39\lib\enum.py", line 352, in getattr
raise AttributeError(name) from None
AttributeError: AudioQuality
@kokarare1212 commented on GitHub (Apr 26, 2022):
Please provide the code that reproduces the problem.
@Pranavprana commented on GitHub (Apr 27, 2022):
from librespot.metadata import TrackId
from librespot.audio.decoders import AudioQuality, VorbisOnlyAudioQuality
session = Session.Builder()
.user_pass("Username", "Password")
.create()
track_id = TrackId.from_uri("spotify:track:xxxxxxxxxxxxxxxxxxxxxx")
stream = session.content_feeder().load(track_id, VorbisOnlyAudioQuality(AudioQuality.VERY_HIGH), False, None)
stream.input_stream.stream().read()
##############################################################
stream = session.content_feeder().load(track_id, VorbisOnlyAudioQuality(AudioQuality.VERY_HIGH), False, None)
File "C:\Python39\lib\site-packages\librespot\audio_init_.py", line 717, in load
return self.load_track(playable_id, audio_quality_picker, preload,
File "C:\Python39\lib\site-packages\librespot\audio_init_.py", line 778, in load_track
return self.load_stream(file, track, None, preload, halt_listener)
File "C:\Python39\lib\site-packages\librespot\audio_init_.py", line 732, in load_stream
return CdnFeedHelper.load_track(self.session, track, file,
File "C:\Python39\lib\site-packages\librespot\audio_init.py", line 335, in load_track
key = session.audio_key().get_audio_key(track.gid, file.file_id)
File "C:\Python39\lib\site-packages\librespot\audio_init.py", line 277, in get_audio_key
return self.get_audio_key(gid, file_id, False)
File "C:\Python39\lib\site-packages\librespot\audio_init_.py", line 278, in get_audio_key
raise RuntimeError(
RuntimeError: Failed fetching audio key! gid: c2de18c6ab584f27bfbd42893dd7d7ca, fileId: 059df821cead0cde67b1e88a47ae87d05b6b5c3c
@kokarare1212 commented on GitHub (Apr 27, 2022):
You used an unsupported codec or
You may have used VERY_HIGH by logging in with a non-Premium account.
@Pranavprana commented on GitHub (Apr 27, 2022):
i did normal no error
but can u guide me on what should I use to get music played from it
running this code just complete without any error
@kokarare1212 commented on GitHub (Apr 27, 2022):
Music can be played by using external applications.
e.g. FFplay * not tested
@Pranavprana commented on GitHub (Apr 27, 2022):
thankyou!