Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Podcasts break playlist sync #24

Open
Qupci opened this issue Jun 10, 2023 · 3 comments
Open

Podcasts break playlist sync #24

Qupci opened this issue Jun 10, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Qupci
Copy link

Qupci commented Jun 10, 2023

Tried with up to date ARL, but the result is the same. The cause of the problem might lay in the API change on the Deezer side, but I don't know.

Here is the console output:

(base) C:\Users\Qupci>spotify_sync run auto --profile try1
[2023-06-10 23:52:50,380] INFO      SpotifySync      : Loading config from profile: try1
[2023-06-10 23:52:50,381] INFO      SpotifySync      : Script started with auto command
[2023-06-10 23:52:53,791] INFO      SpotifyService   : Fetching liked songs
[2023-06-10 23:53:13,376] INFO      SpotifyService   : Added 18 new liked song(s) from Spotify (cached:2662)
[2023-06-10 23:53:13,377] INFO      SpotifyService   : Fetching playlist songs
Traceback (most recent call last):
  File "D:\SOFTWARE\Anaconda3\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "D:\SOFTWARE\Anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\Scripts\spotify_sync.exe\__main__.py", line 7, in <module>
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\__main__.py", line 48, in auto
    app.auto()
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\cli.py", line 57, in auto
    spotify_svc.sync()
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\spotify_.py", line 37, in sync
    liked, playlists = self._merge_playlist_songs(liked)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\spotify_.py", line 98, in _merge_playlist_songs
    playlist_songs = self._get_all_playlist_songs(playlists)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\spotify_.py", line 72, in _get_all_playlist_songs
    return self.paginator.get_songs_from_playlists(playlists=playlists)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\spotify_.py", line 184, in get_songs_from_playlists
    return self._to_spotify_song(response)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\spotify_.py", line 262, in _to_spotify_song
    s.from_api(api_s)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\dataclasses.py", line 107, in from_api
    song["track"]["artists"][0]["name"]
KeyError: 'artists'
@Qupci Qupci changed the title Run auto is now results in consistent error. Run auto results in consistent error. Jun 10, 2023
@erstert3st
Copy link

same here, something to do with Podcast, remove all Playlists that are Podcast/contains podcasts

@Qupci
Copy link
Author

Qupci commented Jun 12, 2023

Yes, excluding playlists containing podcasts fixed the issue! Thanks.

@jbh-cloud
Copy link
Collaborator

Thanks for debugging this, didn't foresee podcasts in Spotify when I initially wrote this. Should be a simple fix.

@jbh-cloud jbh-cloud added the bug Something isn't working label Jun 26, 2023
@jbh-cloud jbh-cloud changed the title Run auto results in consistent error. Podcasts break playlist sync Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants