spotcast: V5 Playlist websocket seems broken.

The problem

Playlist websocket returns 404 with proper category set. Retrieved by the category websocket, response form the category websocket below:

0: Object { id: "0JQ5DAt0tbjZptfcdMSKl3", icon: "https://t.scdn.co/images/728ed47fc1674feb95f7ac20236eb6d7.jpeg", name: "Made For You" }
​​
1: Object { id: "0JQ5DAqbMKFz6FAsUtgAab", icon: "https://t.scdn.co/images/728ed47fc1674feb95f7ac20236eb6d7.jpeg", name: "New Releases" }
​​
2: Object { id: "0JQ5DAqbMKFDKyRxRDLIbk", icon: "https://t.scdn.co/images/dec76a385201436281efb6796a54f479.jpeg", name: "Happy Holidays" }
​​
3: Object { id: "0JQ5DAqbMKFEC4WFtoNRpw", icon: "https://t.scdn.co/media/derived/pop-274x274_447148649685019f5e2a03a39e78ba52_0_0_274_274.jpg", name: "Pop" }
​​
4: Object { id: "0JQ5DAqbMKFQ00XGBls6ym", icon: "https://t.scdn.co/images/728ed47fc1674feb95f7ac20236eb6d7.jpeg", name: "Hip-Hop" }
​​
5: Object { id: "0JQ5DAqbMKFHOzuVTgTizF", icon: "https://t.scdn.co/images/728ed47fc1674feb95f7ac20236eb6d7.jpeg", name: "Dance/Electronic" }
​​
6: Object { id: "0JQ5DAudkNjCgYMM0TZXDw", icon: "https://charts-images.scdn.co/spotify-charts-logos/music_charts_search_arrow_274x274.jpeg", name: "Charts" }
​​
7: Object { id: "0JQ5DAqbMKFCLroFGPFVr5", icon: "https://t.scdn.co/images/970c289306e64c8782ecc84de5dea795.jpeg", name: "Dutch music" }

​​

System Health details

System Information

version core-2024.12.0.dev0
installation_type Unsupported Third Party Container
dev true
hassio false
docker true
user vscode
virtualenv true
python_version 3.12.7
os_name Linux
os_version 5.15.167.4-microsoft-standard-WSL2
arch x86_64
timezone Europe/Amsterdam
config_dir /workspaces/core/config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 4997
Installed Version 2.0.1
Stage running
Available Repositories 1465
Downloaded Repositories 2
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Dashboards
dashboards 3
resources 2
views 1
mode storage
Recorder
oldest_recorder_run November 27, 2024 at 6:42 AM
current_recorder_run November 27, 2024 at 6:17 PM
estimated_db_size 0.94 MiB
database_engine sqlite
database_version 3.40.1
Spotcast
Version 5.0.0-b9
Mikeve97 Is Default true
Mikeve97 Public Endpoint ok
Mikeve97 Public Token healthy
Mikeve97 Private Endpoint ok
Mikeve97 Private Token healthy
Spotify
api_endpoint_reachable ok

What type of installation are you running?

Home Assistant OS

Diagnostics information

2024-11-27 17:19:00.549 ERROR (SyncWorker_2) [spotipy.client] HTTP Error for GET to https://api.spotify.com/v1/browse/categories/0JQ5DAtOnAEpjOgUKwXyxj/playlists with Params: {‘country’: ‘NL’, ‘limit’: 50, ‘offset’: 0} returned 404 due to Not Found 2024-11-27 17:19:00.550 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139869920161520] Error handling message: Unknown error (unknown_error) mike from 172.17.0.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0) Traceback (most recent call last): File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/spotipy/client.py”, line 275, in _internal_call response.raise_for_status() File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/requests/models.py”, line 1024, 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/browse/categories/0JQ5DAtOnAEpjOgUKwXyxj/playlists?country=NL&limit=50&offset=0

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/workspaces/core/homeassistant/components/websocket_api/decorators.py”, line 28, in _handle_async_response await func(hass, connection, msg) File “/workspaces/core/config/custom_components/spotcast/websocket/utils.py”, line 18, in wrapper return await func(hass, connection, msg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/workspaces/core/config/custom_components/spotcast/websocket/playlists_handler.py”, line 58, in async_get_playlists playlists = await account.async_category_playlists( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/workspaces/core/config/custom_components/spotcast/spotify/account.py”, line 846, in async_category_playlists playlists = await self._async_pager( ^^^^^^^^^^^^^^^^^^^^^^^^ File “/workspaces/core/config/custom_components/spotcast/spotify/account.py”, line 935, in _async_pager result = await self.hass.async_add_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.12/concurrent/futures/thread.py”, line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/spotipy/client.py”, line 1657, in category_playlists return self._get( ^^^^^^^^^^ File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/spotipy/client.py”, line 327, in _get return self._internal_call(“GET”, url, payload, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/spotipy/client.py”, line 297, in _internal_call raise SpotifyException( spotipy.exceptions.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/browse/categories/0JQ5DAtOnAEpjOgUKwXyxj/playlists?country=NL&limit=50&offset=0: Not Found, reason: None 2024-11-27 17:19:44.886 ERROR (SyncWorker_4) [spotipy.client] HTTP Error for GET to https://api.spotify.com/v1/browse/categories/0JQ5DAt0tbjZptfcdMSKl3/playlists with Params: {‘country’: ‘NL’, ‘limit’: 50, ‘offset’: 0} returned 404 due to Not Found 2024-11-27 17:19:44.886 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139869920165408] Error handling message: Unknown error (unknown_error) mike from 172.17.0.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0) Traceback (most recent call last): File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/spotipy/client.py”, line 275, in _internal_call response.raise_for_status() File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/requests/models.py”, line 1024, 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/browse/categories/0JQ5DAt0tbjZptfcdMSKl3/playlists?country=NL&limit=50&offset=0

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/workspaces/core/homeassistant/components/websocket_api/decorators.py”, line 28, in _handle_async_response await func(hass, connection, msg) File “/workspaces/core/config/custom_components/spotcast/websocket/utils.py”, line 18, in wrapper return await func(hass, connection, msg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/workspaces/core/config/custom_components/spotcast/websocket/playlists_handler.py”, line 58, in async_get_playlists playlists = await account.async_category_playlists( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/workspaces/core/config/custom_components/spotcast/spotify/account.py”, line 846, in async_category_playlists playlists = await self._async_pager( ^^^^^^^^^^^^^^^^^^^^^^^^ File “/workspaces/core/config/custom_components/spotcast/spotify/account.py”, line 935, in _async_pager result = await self.hass.async_add_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.12/concurrent/futures/thread.py”, line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/spotipy/client.py”, line 1657, in category_playlists return self._get( ^^^^^^^^^^ File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/spotipy/client.py”, line 327, in _get return self._internal_call(“GET”, url, payload, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/spotipy/client.py”, line 297, in _internal_call raise SpotifyException( spotipy.exceptions.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/browse/categories/0JQ5DAt0tbjZptfcdMSKl3/playlists?country=NL&limit=50&offset=0: Not Found, reason: None 2024-11-27 17:23:21.482 DEBUG (MainThread) [custom_components.spotcast.spotify.account] Retrieving playlist linked to category id 0JQ5DAt0tbjZptfcdMSKl3 2024-11-27 17:23:21.505 ERROR (SyncWorker_7) [spotipy.client] HTTP Error for GET to https://api.spotify.com/v1/browse/categories/0JQ5DAt0tbjZptfcdMSKl3/playlists with Params: {‘country’: ‘NL’, ‘limit’: 50, ‘offset’: 0} returned 404 due to Not Found 2024-11-27 17:23:21.506 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139869921426112] Error handling message: Unknown error (unknown_error) mike from 172.17.0.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0) Traceback (most recent call last): File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/spotipy/client.py”, line 275, in _internal_call response.raise_for_status() File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/requests/models.py”, line 1024, 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/browse/categories/0JQ5DAt0tbjZptfcdMSKl3/playlists?country=NL&limit=50&offset=0

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/workspaces/core/homeassistant/components/websocket_api/decorators.py”, line 28, in _handle_async_response await func(hass, connection, msg) File “/workspaces/core/config/custom_components/spotcast/websocket/utils.py”, line 18, in wrapper return await func(hass, connection, msg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/workspaces/core/config/custom_components/spotcast/websocket/playlists_handler.py”, line 58, in async_get_playlists playlists = await account.async_category_playlists( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/workspaces/core/config/custom_components/spotcast/spotify/account.py”, line 846, in async_category_playlists playlists = await self._async_pager( ^^^^^^^^^^^^^^^^^^^^^^^^ File “/workspaces/core/config/custom_components/spotcast/spotify/account.py”, line 935, in _async_pager result = await self.hass.async_add_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.12/concurrent/futures/thread.py”, line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/spotipy/client.py”, line 1657, in category_playlists return self._get( ^^^^^^^^^^ File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/spotipy/client.py”, line 327, in _get return self._internal_call(“GET”, url, payload, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/vscode/.local/ha-venv/lib/python3.12/site-packages/spotipy/client.py”, line 297, in _internal_call raise SpotifyException( spotipy.exceptions.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/browse/categories/0JQ5DAt0tbjZptfcdMSKl3/playlists?country=NL&limit=50&offset=0: Not Found, reason: None

Example YAML snippet

No response

Anything in the logs that might be useful for us?

spotipy.exceptions.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/browse/categories/0JQ5DAt0tbjZptfcdMSKl3/playlists?country=NL&limit=50&offset=0:

Additional information

Not sure if this issues lies with spotify or spotcast, but could you check if it is working for your account? The spotify home assistant integration is also broken for me which makes me a bit suspicious the issue isn’t realy at spotcast’s end.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15

Most upvoted comments

yes of course, that’s why I haven’t closed the ticket. I’ll update if I’m able to fix anything