kamilkosek / jellyplist

A utility to help you sync playlists from spotify to your jellyfin server
GNU General Public License v3.0
144 stars 0 forks source link

After first login page crashes #23

Open TallManCycles opened 4 days ago

TallManCycles commented 4 days ago

After logging in to the page, it's redirected to /playlist.

This is I think trying to hit an endpoint https://api.spotify.com/v1/browse/featured-playlists which receives a 404, and crashes.

https://developer.spotify.com/documentation/web-api/reference/get-featured-playlists (marked as depreciated)

[2024-11-27 18:16:57,041][ __init__.py: 119 - <module>() ] INFO - setting up spotipy [2024-11-27 18:16:57,041][ __init__.py: 125 - <module>() ] INFO - setting up jellyfin client, BaseUrl = http://192.168.0.201:8096, timeout = 10 [2024-11-27 18:16:57,429][ __init__.py: 134 - <module>() ] INFO - connecting to db: postgres-jellyplist:5432 [2024-11-27 18:16:57,448][ __init__.py: 41 - check_db_connection() ] INFO - Successfully connected to the database. [2024-11-27 18:16:57,449][ __init__.py: 140 - <module>() ] INFO - applying db migrations [2024-11-27 18:16:57,451][ __init__.py: 156 - <module>() ] INFO - initializing celery [2024-11-27 18:16:57,749][ __init__.py: 161 - <module>() ] INFO - Jellyplist 0.1.6 started [2024-11-27 18:18:16,077][ client.py: 292 - _internal_call() ] ERROR - HTTP Error for GET to https://api.spotify.com/v1/browse/featured-playlists with Params: {'locale': None, 'country': 'DE', 'timestamp': None, 'limit': 16, 'offset': 0} returned 404 due to Not Found [2024-11-27 18:18:16,077][ app.py: 875 - log_exception() ] ERROR - Exception on /playlists [GET] Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/spotipy/client.py", line 275, in _internal_call response.raise_for_status() File "/usr/local/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/featured-playlists?country=DE&limit=16&offset=0 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1511, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 919, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/jellyplist/app/functions.py", line 273, in decorated_function return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/jellyplist/app/routes.py", line 165, in loaditems data, max_items, items_title = functions.getFeaturedPlaylists(country=country, offset=offset) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/jellyplist/app/functions.py", line 184, in getFeaturedPlaylists playlists_data = sp.featured_playlists(country=country, limit=16, offset=offset) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/spotipy/client.py", line 1573, in featured_playlists return self._get( ^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/spotipy/client.py", line 327, in _get return self._internal_call("GET", url, payload, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/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/featured-playlists?country=DE&limit=16&offset=0: Not Found, reason: None

I can also recreate this if I use my own spotify credentials and hit the API

https://api.spotify.com/v1/browse/featured-playlists

{ "error": { "status": 404, "message": "Not Found" } }

Categories load fine.

Based in Australia.

kamilkosek commented 4 days ago

I am also receiving the 404 😫 Could you do me a favour, and change the docker image to ‚dev‘ , enable debug logging and then try to browse through categories and post the logs ?

TallManCycles commented 4 days ago

Sure!

Set the images to ghcr.io/kamilkosek/jellyplist:dev and added debug to the .env.

_jellyplist_logs.txt

kamilkosek commented 4 days ago

25

TallManCycles commented 4 days ago

Dang :-) All good!