[GH-ISSUE #318] [BUG] RuntimeError: Cannot get alternative track #55

Open
opened 2026-02-27 08:11:40 +03:00 by kerem · 2 comments
Owner

Originally created by @AleTopp on GitHub (Oct 16, 2025).
Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/318

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
Originally created by @AleTopp on GitHub (Oct 16, 2025). Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/318 **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
Author
Owner

@NickDegrasse commented on GitHub (Nov 6, 2025):

Also experiencing this error, on windows with Zotify, curious to see if there's a fix soon.

<!-- gh-comment-id:3498398872 --> @NickDegrasse commented on GitHub (Nov 6, 2025): Also experiencing this error, on windows with Zotify, curious to see if there's a fix soon.
Author
Owner

@TomerGamerTV commented on GitHub (Nov 8, 2025):

Same issue here.

<!-- gh-comment-id:3506699914 --> @TomerGamerTV commented on GitHub (Nov 8, 2025): Same issue here.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot-python-kokarare1212#55
No description provided.