[GH-ISSUE #273] YTMusic.get_library_playlists() -> Server returned HTTP 500 #213

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

Originally created by @willcharlton on GitHub (May 19, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/273

Issue listing playlists in user library.

Code / Response

$ python
Python 3.8.9 (default, Mar 30 2022, 13:51:17) 
[Clang 13.1.6 (clang-1316.0.21.2.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ytmusicapi import YTMusic
>>> yt = YTMusic('./headers_auth.json')
>>> yt.get_library_playlists()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/me/test/ytmusicapi/.venv/lib/python3.8/site-packages/ytmusicapi/mixins/library.py", line 27, in get_library_playlists
    response = self._send_request(endpoint, body)
  File "/Users/me/test/ytmusicapi/.venv/lib/python3.8/site-packages/ytmusicapi/ytmusic.py", line 144, in _send_request
    raise Exception(message + error)
Exception: Server returned HTTP 500: Internal Server Error.
Internal error encountered.
>>> 

I have verified that I can retrieve Public playlists in my account, but not private ones. I'm not sure if that's related, but seemed relevant.

Originally created by @willcharlton on GitHub (May 19, 2022). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/273 Issue listing playlists in user library. ## Code / Response ```python $ python Python 3.8.9 (default, Mar 30 2022, 13:51:17) [Clang 13.1.6 (clang-1316.0.21.2.3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from ytmusicapi import YTMusic >>> yt = YTMusic('./headers_auth.json') >>> yt.get_library_playlists() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/me/test/ytmusicapi/.venv/lib/python3.8/site-packages/ytmusicapi/mixins/library.py", line 27, in get_library_playlists response = self._send_request(endpoint, body) File "/Users/me/test/ytmusicapi/.venv/lib/python3.8/site-packages/ytmusicapi/ytmusic.py", line 144, in _send_request raise Exception(message + error) Exception: Server returned HTTP 500: Internal Server Error. Internal error encountered. >>> ``` I have verified that I can retrieve Public playlists in my account, but not private ones. I'm not sure if that's related, but seemed relevant.
kerem closed this issue 2026-02-27 22:08:38 +03:00
Author
Owner

@sigma67 commented on GitHub (May 20, 2022):

Seems like an issue with your headers. Can you call other private endpoints?

<!-- gh-comment-id:1132604845 --> @sigma67 commented on GitHub (May 20, 2022): Seems like an issue with your headers. Can you call other private endpoints?
Author
Owner

@willcharlton commented on GitHub (May 24, 2022):

Thanks for the pointer. It was my X-Goog-AuthUser integer. It was set incorrectly. Loading fine now :)

<!-- gh-comment-id:1136380070 --> @willcharlton commented on GitHub (May 24, 2022): Thanks for the pointer. It was my `X-Goog-AuthUser` integer. It was set incorrectly. Loading fine now :)
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/ytmusicapi#213
No description provided.