rnagabhyrava / plex-playlist-sync

App to recreate spotify/deezer playlists in your local plex server.
GNU General Public License v3.0
166 stars 21 forks source link

Container keeps shutting down #77

Closed stefan240987 closed 1 month ago

stefan240987 commented 1 month ago

Describe the bug The container keeps crashing after a few seconds. and i have no idea why

To Reproduce Steps to reproduce the behavior:

  1. Configuration:

version: "2.1" services: playlistSync: image: rnagabhyrava/plexplaylistsync:latest container_name: playlistSync

optional only if you chose WRITE_MISSING_AS_CSV=1 in env

volumes:
  - /usr/music:/data
environment:
  - PLEX_URL= redacted
  - PLEX_TOKEN= redacted
  - WRITE_MISSING_AS_CSV=0
  - APPEND_SERVICE_SUFFIX=1
  - ADD_PLAYLIST_POSTER=1
  - ADD_PLAYLIST_DESCRIPTION=1
  - APPEND_INSTEAD_OF_SYNC=0
  - SECONDS_TO_WAIT=84000
  - SPOTIFY_CLIENT_ID=redacted
  - SPOTIFY_CLIENT_SECRET= redacted
  - SPOTIFY_USER_ID= redacted
  - DEEZER_USER_ID=
  - DEEZER_PLAYLIST_ID=
restart: unless-stopped

This is from the log:

INFO:root:Starting playlist sync INFO:root:Starting Spotify playlist sync INFO:root:retrying search for Selvtillid og selvværd - del 1 (Meditation) INFO:root:search for Selvtillid og selvværd - del 1 (Meditation) successful INFO:root:retrying search for Selvtillid og selvværd - del 2 (Meditation) INFO:root:search for Selvtillid og selvværd - del 2 (Meditation) successful INFO:root:retrying search for Selvtillid og selvværd - del 3 (Meditation) INFO:root:search for Selvtillid og selvværd - del 3 (Meditation) successful INFO:root:retrying search for Indre ro (meditation) INFO:root:search for Indre ro (meditation) successful Traceback (most recent call last): File "/app/./plex-playlist-sync/run.py", line 71, in spotify_playlist_sync(sp, plex, userInputs) File "/app/plex-playlist-sync/utils/spotify.py", line 105, in spotify_playlist_sync update_or_create_plex_playlist(plex, playlist, tracks, userInputs) File "/app/plex-playlist-sync/utils/plex.py", line 150, in update_or_create_plex_playlist available_tracks, missing_tracks = _get_available_plex_tracks(plex, tracks) File "/app/plex-playlist-sync/utils/plex.py", line 84, in _get_available_plex_tracks None, s.artist().title.lower(), track.artist.lower() AttributeError: 'NoneType' object has no attribute 'lower' INFO:root:Starting playlist sync INFO:root:Starting Spotify playlist sync INFO:root:retrying search for Selvtillid og selvværd - del 1 (Meditation) INFO:root:search for Selvtillid og selvværd - del 1 (Meditation) successful INFO:root:retrying search for Selvtillid og selvværd - del 2 (Meditation) INFO:root:search for Selvtillid og selvværd - del 2 (Meditation) successful INFO:root:retrying search for Selvtillid og selvværd - del 3 (Meditation) INFO:root:search for Selvtillid og selvværd - del 3 (Meditation) successful INFO:root:retrying search for Indre ro (meditation) INFO:root:search for Indre ro (meditation) successful Traceback (most recent call last): File "/app/./plex-playlist-sync/run.py", line 71, in spotify_playlist_sync(sp, plex, userInputs) File "/app/plex-playlist-sync/utils/spotify.py", line 105, in spotify_playlist_sync update_or_create_plex_playlist(plex, playlist, tracks, userInputs) File "/app/plex-playlist-sync/utils/plex.py", line 150, in update_or_create_plex_playlist available_tracks, missing_tracks = _get_available_plex_tracks(plex, tracks) File "/app/plex-playlist-sync/utils/plex.py", line 84, in _get_available_plex_tracks None, s.artist().title.lower(), track.artist.lower() AttributeError: 'NoneType' object has no attribute 'lower'

rnagabhyrava commented 1 month ago

Looks like spotify is returning a null value for artist name/album and that is causing the crash.

stefan240987 commented 1 month ago

Yeah that did the trick :)