[GH-ISSUE #52] AttributeError: 'Track' object has no attribute 'alternative_list' #3

Closed
opened 2026-02-27 08:11:23 +03:00 by kerem · 10 comments
Owner

Originally created by @ghost on GitHub (Jul 7, 2021).
Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/52

On playing a specific track (https://open.spotify.com/track/1peqrZv4XESUQ0oG4bWU7t) librespot crashes for some reason with the following backtrace...

image

Originally created by @ghost on GitHub (Jul 7, 2021). Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/52 On playing a specific track ([https://open.spotify.com/track/1peqrZv4XESUQ0oG4bWU7t](https://open.spotify.com/track/1peqrZv4XESUQ0oG4bWU7t)) librespot crashes for some reason with the following backtrace... ![image](https://user-images.githubusercontent.com/12180913/124738789-642c8280-df6d-11eb-8b2f-e83f726bb501.png)
kerem 2026-02-27 08:11:23 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@kokarare1212 commented on GitHub (Jul 8, 2021):

Thank you for your inquiry.
That error itself was fixed with
github.com/kokarare1212/librespot-python@e8f0e024d9

However, in my environment, it seems to be failing to load packets, so I will investigate additionally.

<!-- gh-comment-id:876013545 --> @kokarare1212 commented on GitHub (Jul 8, 2021): Thank you for your inquiry. That error itself was fixed with https://github.com/kokarare1212/librespot-python/commit/e8f0e024d97fc6b96533dfdff841ab76bb6cc5cf However, in my environment, it seems to be failing to load packets, so I will investigate additionally.
Author
Owner

@ghost commented on GitHub (Jul 8, 2021):

Thanks for the quick reply and patch, although this doesn't seem to be fixing the main problem for me, as I still get the same error.
image

Goodluck with the additional investigation though! :)

<!-- gh-comment-id:876056088 --> @ghost commented on GitHub (Jul 8, 2021): Thanks for the quick reply and patch, although this doesn't seem to be fixing the main problem for me, as I still get the same error. ![image](https://user-images.githubusercontent.com/12180913/124849795-879a1080-dff3-11eb-8dea-c4e82a672833.png) Goodluck with the additional investigation though! :)
Author
Owner

@kokarare1212 commented on GitHub (Jul 8, 2021):

It was a mistake.
This commit should resolve the error itself.
github.com/kokarare1212/librespot-python@e9c396b756

<!-- gh-comment-id:876071582 --> @kokarare1212 commented on GitHub (Jul 8, 2021): It was a mistake. This commit should resolve the error itself. https://github.com/kokarare1212/librespot-python/commit/e9c396b756db42ef9d2d0716fb314e24f3389324
Author
Owner

@ghost commented on GitHub (Jul 8, 2021):

It seemed to fix that error!

Although there is a new error now in its place:

image

<!-- gh-comment-id:876089529 --> @ghost commented on GitHub (Jul 8, 2021): It seemed to fix that error! Although there is a new error now in its place: ![image](https://user-images.githubusercontent.com/12180913/124856788-4576cc00-dfff-11eb-9a2d-ee6f709998bd.png)
Author
Owner

@ghost commented on GitHub (Jul 8, 2021):

I also found something interesting!

Turns out for one of the tracks that can cause librespot to crash. I managed to find/get to different url's for the exact same song, one of these urls works with librespot and the other causes the crash. Here they are if you wanna have a look for testing! :)

WORKING: https://open.spotify.com/track/2CgOd0Lj5MuvOqzqdaAXtS
BROKEN: https://open.spotify.com/track/3ISYGHoYnu4gos6JNMfL4z

<!-- gh-comment-id:876149738 --> @ghost commented on GitHub (Jul 8, 2021): I also found something interesting! Turns out for one of the tracks that can cause librespot to crash. I managed to find/get to different url's for the exact same song, one of these urls works with librespot and the other causes the crash. Here they are if you wanna have a look for testing! :) WORKING: [https://open.spotify.com/track/2CgOd0Lj5MuvOqzqdaAXtS](https://open.spotify.com/track/2CgOd0Lj5MuvOqzqdaAXtS) BROKEN: [https://open.spotify.com/track/3ISYGHoYnu4gos6JNMfL4z](https://open.spotify.com/track/3ISYGHoYnu4gos6JNMfL4z)
Author
Owner

@kokarare1212 commented on GitHub (Jul 8, 2021):

Yes, perhaps the broken track is failing to load packets looking for a replacement because the original track is not available.
I may be slow on bug tracking because I can't find the time.

<!-- gh-comment-id:876216162 --> @kokarare1212 commented on GitHub (Jul 8, 2021): Yes, perhaps the broken track is failing to load packets looking for a replacement because the original track is not available. I may be slow on bug tracking because I can't find the time.
Author
Owner

@ghost commented on GitHub (Jul 8, 2021):

Yeah maybe. 👍 I'm great at python so I might be able to help debug this when I get time, although I wasn't the one who wrote this so I'll see how I go

<!-- gh-comment-id:876265395 --> @ghost commented on GitHub (Jul 8, 2021): Yeah maybe. 👍 I'm great at python so I might be able to help debug this when I get time, although I wasn't the one who wrote this so I'll see how I go
Author
Owner

@ghost commented on GitHub (Jul 10, 2021):

Interesting find, if you do an api request on a specific track that breaks, the "id" it returns in the json will actually be different, if you try to play that new track id it all play perfectly with no problems. Idk if this can help you fix the bug but you're welcome lol

<!-- gh-comment-id:877703885 --> @ghost commented on GitHub (Jul 10, 2021): Interesting find, if you do an api request on a specific track that breaks, the "id" it returns in the json will actually be different, if you try to play that new track id it all play perfectly with no problems. Idk if this can help you fix the bug but you're welcome lol
Author
Owner

@kokarare1212 commented on GitHub (Jul 20, 2021):

It was a bug in migrating the original data when using the Metadata.Track alternative.

<!-- gh-comment-id:883295494 --> @kokarare1212 commented on GitHub (Jul 20, 2021): It was a bug in migrating the original data when using the Metadata.Track alternative.
Author
Owner

@kokarare1212 commented on GitHub (Aug 11, 2021):

I've fixed it and will close the issue.

<!-- gh-comment-id:896567769 --> @kokarare1212 commented on GitHub (Aug 11, 2021): I've fixed it and will close the issue.
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#3
No description provided.