[GH-ISSUE #199] [BUG]Recently I got a SpotifyAuthenticationException: PremiumAccountRequired #36

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

Originally created by @HendrikV37 on GitHub (May 29, 2023).
Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/199

Describe the bug
During logging this was reported:
File "/home/pi/Oradio_new/spotify_music_player_service.py", line 169, in connect
self.session = Session.Builder().stored_file().create()
File "/usr/local/lib/python3.9/dist-packages/librespot/core.py", line 1275, in create
session.authenticate(self.login_credentials)
File "/usr/local/lib/python3.9/dist-packages/librespot/core.py", line 697, in authenticate
self.__authenticate_partial(credential, False)
File "/usr/local/lib/python3.9/dist-packages/librespot/core.py", line 1055, in __authenticate_partial
raise Session.SpotifyAuthenticationException(ap_login_failed)
librespot.core.SpotifyAuthenticationException: PremiumAccountRequired

To Reproduce
Expected behavior
The librespot package was running for several month without any issues like this

Screenshots
If applicable, add screenshots to help explain your problem.

Client Information (please complete the following information):

  • Linux on RaspberryPi
  • Python Version [e.g. 3.9.0]

Additional context
The same issue was reported at https://github.com/librespot-org/librespot-java/issues/614
The solution was to update the protocol version of the spotify client.
I did same thing in the spotify python code:
def standard_build_info() -> BuildInfo:
return BuildInfo(product=Product.PRODUCT_CLIENT,
product_flags=[ProductFlags.PRODUCT_FLAG_NONE],
platform=Version.platform(),
#version=112800721)
version=117300517)
...AND now it works again. Maybe something to include in the code.

Originally created by @HendrikV37 on GitHub (May 29, 2023). Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/199 **Describe the bug** During logging this was reported: File "/home/pi/Oradio_new/spotify_music_player_service.py", line 169, in connect self.session = Session.Builder().stored_file().create() File "/usr/local/lib/python3.9/dist-packages/librespot/core.py", line 1275, in create session.authenticate(self.login_credentials) File "/usr/local/lib/python3.9/dist-packages/librespot/core.py", line 697, in authenticate self.__authenticate_partial(credential, False) File "/usr/local/lib/python3.9/dist-packages/librespot/core.py", line 1055, in __authenticate_partial raise Session.SpotifyAuthenticationException(ap_login_failed) librespot.core.SpotifyAuthenticationException: PremiumAccountRequired **To Reproduce** **Expected behavior** The librespot package was running for several month without any issues like this **Screenshots** If applicable, add screenshots to help explain your problem. **Client Information (please complete the following information):** - Linux on RaspberryPi - Python Version [e.g. 3.9.0] **Additional context** The same issue was reported at https://github.com/librespot-org/librespot-java/issues/614 The solution was to update the protocol version of the spotify client. I did same thing in the spotify python code: def standard_build_info() -> BuildInfo: return BuildInfo(product=Product.PRODUCT_CLIENT, product_flags=[ProductFlags.PRODUCT_FLAG_NONE], platform=Version.platform(), #version=112800721) version=117300517) ...AND now it works again. Maybe something to include in the code.
kerem 2026-02-27 08:11:32 +03:00
Author
Owner

@kokarare1212 commented on GitHub (May 29, 2023):

duplicate https://github.com/kokarare1212/librespot-python/issues/193

<!-- gh-comment-id:1567091261 --> @kokarare1212 commented on GitHub (May 29, 2023): duplicate https://github.com/kokarare1212/librespot-python/issues/193
Author
Owner

@HendrikV37 commented on GitHub (May 29, 2023):

OK, now i see there is already an update. I will update my package with new version.
Thanks

<!-- gh-comment-id:1567165732 --> @HendrikV37 commented on GitHub (May 29, 2023): OK, now i see there is already an update. I will update my package with new version. Thanks
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#36
No description provided.