[GH-ISSUE #912] Podcast Playlist retrieval not working #547

Closed
opened 2026-02-27 23:23:16 +03:00 by kerem · 1 comment
Owner

Originally created by @deadl0ck on GitHub (Dec 4, 2022).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/912

Describe the bug
Trying to call the "show_episodes" api in spotipy and getting back "returned 404 due to non existing id"

Your code
SHOW_ID = "00sL9tgDezr0PRSzd3C7H6"
spotify = spotipy.Spotify(client_credentials_manager=SpotifyClientCredentials())
results = spotify.show_episodes(f'{SHOW_ID}')

Expected behavior
Should return shows as JSON

Output
/Users/mstephenson/opt/miniconda3/envs/RAMagGenPy/bin/python /Users/mstephenson/git/RGDSMag/venv/spotify.py
HTTP Error for GET to https://api.spotify.com/v1/shows/00sL9tgDezr0PRSzd3C7H6/episodes/ with Params: {'limit': 50, 'offset': 0, 'market': None} returned 404 due to non existing id
Traceback (most recent call last):
File "/Users/mstephenson/opt/miniconda3/envs/RAMagGenPy/lib/python3.9/site-packages/spotipy/client.py", line 245, in _internal_call
response.raise_for_status()
File "/Users/mstephenson/opt/miniconda3/envs/RAMagGenPy/lib/python3.9/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.spotify.com/v1/shows/00sL9tgDezr0PRSzd3C7H6/episodes/?limit=50&offset=0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/mstephenson/git/RGDSMag/venv/spotify.py", line 9, in
results = spotify.show_episodes(f'{SHOW_ID}')
File "/Users/mstephenson/opt/miniconda3/envs/RAMagGenPy/lib/python3.9/site-packages/spotipy/client.py", line 512, in show_episodes
return self._get(
File "/Users/mstephenson/opt/miniconda3/envs/RAMagGenPy/lib/python3.9/site-packages/spotipy/client.py", line 297, in _get
return self._internal_call("GET", url, payload, kwargs)
File "/Users/mstephenson/opt/miniconda3/envs/RAMagGenPy/lib/python3.9/site-packages/spotipy/client.py", line 267, in _internal_call
raise SpotifyException(
spotipy.exceptions.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/shows/00sL9tgDezr0PRSzd3C7H6/episodes/?limit=50&offset=0:
non existing id, reason: None

Environment:

  • OS: Mac
  • Python version 3.9
  • spotipy version spotipy-2.21.0-py3-none-any.whl
  • your IDE (if using any) PyCharm

Additional context
I believe the scope is not being used.
I can get the show ID using curl and the example here: https://developer.spotify.com/console/get-show-episodes/?id=00sL9tgDezr0PRSzd3C7H6&market=&limit=50&offset=0

I can recreate the error in Curl if I use the Bearer ID from the spotipy client, so I believe there is an error with the Berer ID in that it needs to be in the correct scope (user-read-playback-position) - see https://developer.spotify.com/documentation/general/guides/authorization/scopes/

Originally created by @deadl0ck on GitHub (Dec 4, 2022). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/912 **Describe the bug** Trying to call the "show_episodes" api in spotipy and getting back "returned 404 due to non existing id" **Your code** SHOW_ID = "00sL9tgDezr0PRSzd3C7H6" spotify = spotipy.Spotify(client_credentials_manager=SpotifyClientCredentials()) results = spotify.show_episodes(f'{SHOW_ID}') **Expected behavior** Should return shows as JSON **Output** /Users/mstephenson/opt/miniconda3/envs/RAMagGenPy/bin/python /Users/mstephenson/git/RGDSMag/venv/spotify.py HTTP Error for GET to https://api.spotify.com/v1/shows/00sL9tgDezr0PRSzd3C7H6/episodes/ with Params: {'limit': 50, 'offset': 0, 'market': None} returned 404 due to non existing id Traceback (most recent call last): File "/Users/mstephenson/opt/miniconda3/envs/RAMagGenPy/lib/python3.9/site-packages/spotipy/client.py", line 245, in _internal_call response.raise_for_status() File "/Users/mstephenson/opt/miniconda3/envs/RAMagGenPy/lib/python3.9/site-packages/requests/models.py", line 953, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.spotify.com/v1/shows/00sL9tgDezr0PRSzd3C7H6/episodes/?limit=50&offset=0 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/mstephenson/git/RGDSMag/venv/spotify.py", line 9, in <module> results = spotify.show_episodes(f'{SHOW_ID}') File "/Users/mstephenson/opt/miniconda3/envs/RAMagGenPy/lib/python3.9/site-packages/spotipy/client.py", line 512, in show_episodes return self._get( File "/Users/mstephenson/opt/miniconda3/envs/RAMagGenPy/lib/python3.9/site-packages/spotipy/client.py", line 297, in _get return self._internal_call("GET", url, payload, kwargs) File "/Users/mstephenson/opt/miniconda3/envs/RAMagGenPy/lib/python3.9/site-packages/spotipy/client.py", line 267, in _internal_call raise SpotifyException( spotipy.exceptions.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/shows/00sL9tgDezr0PRSzd3C7H6/episodes/?limit=50&offset=0: non existing id, reason: None **Environment:** - OS: Mac - Python version 3.9 - spotipy version spotipy-2.21.0-py3-none-any.whl - your IDE (if using any) PyCharm **Additional context** I believe the scope is not being used. I can get the show ID using curl and the example here: https://developer.spotify.com/console/get-show-episodes/?id=00sL9tgDezr0PRSzd3C7H6&market=&limit=50&offset=0 I can recreate the error in Curl if I use the Bearer ID from the spotipy client, so I believe there is an error with the Berer ID in that it needs to be in the correct scope (user-read-playback-position) - see https://developer.spotify.com/documentation/general/guides/authorization/scopes/
kerem 2026-02-27 23:23:16 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@dieser-niko commented on GitHub (Jan 3, 2023):

https://github.com/spotipy-dev/spotipy/issues/925#issuecomment-1369777663

<!-- gh-comment-id:1369827961 --> @dieser-niko commented on GitHub (Jan 3, 2023): https://github.com/spotipy-dev/spotipy/issues/925#issuecomment-1369777663
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/spotipy#547
No description provided.