ITADN

[BUG] RuntimeError: Cannot get alternative track

#318OpenAleTopp 创建于 2025-10-16
bug
A
AleToppcommented
**Describe the bug** RuntimeError from "load_track" in "audio/__init__.py". Got it using deezspot, and retried directly in librespot-python with same code as #315 (original issue: jakiepari/deezspot#8). **To Reproduce** ``` >>> from librespot.core import Session >>> session = Session.Builder().stored_file("./credentials.json").create() >>> from librespot.metadata import TrackId >>> track_id = TrackId.from_uri("spotify:track:07qo9gnLM488CUr0EtgIA1") >>> from librespot.audio.decoders import AudioQuality, VorbisOnlyAudioQuality >>> stream = session.content_feeder().load(track_id, VorbisOnlyAudioQuality(AudioQuality.NORMAL), False, None) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/path/venv/lib/python3.12/site-packages/librespot/audio/__init__.py", line 722, in load return self.load_track(playable_id, audio_quality_picker, preload, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/path/venv/lib/python3.12/site-packages/librespot/audio/__init__.py", line 774, in load_track raise RuntimeError("Cannot get alternative track") RuntimeError: Cannot get alternative track ``` **Expected behavior** I did not expect an exception **Client Information (please complete the following information):** - OS: Ubuntu (WSL) - Python Version 3.12.3 - Library Version 0.0.9
2 条评论