luigi311 / JellyPlex-Watched

Sync watched between jellyfin and plex locally
GNU General Public License v3.0
422 stars 20 forks source link

[BUG] Error 500 Internal server error #199

Closed AlexODC closed 2 weeks ago

AlexODC commented 2 months ago

Describe the bug When the synchronisation is done, it connect to Plex, sync Plex to Plex and Jelly to Jelly, and after all content and users are listed, when it sycnhronize Plex to Jelly, i have an Error 500 Internal Server Error. I installed this app few weeks ago and it worked perfectly and now with the new update it doesn't work. I tried to downgrade from latest to oldest version but tags aren't recognized.

To Reproduce Steps to reproduce the behavior:

  1. Launch the app in docker
  2. It autolaunch the synchronisation
  3. Sync Plex to Plex OK
  4. Sync Jelly to Jelly OK
  5. Sync Jelly to Plex or vice-versa KO (error 500)

Logs Plex: Generating watched for jibjoub in library Clips Musiques Plex: Generating watched for jibjoub in library Prototypes Plex: Generating watched for crouty in library Films Plex: Generating watched for crouty in library Animés Plex: Generating watched for crouty in library Desssins Animés Plex: Generating watched for crouty in library Séries Plex: Generating watched for crouty in library Musique Plex: Generating watched for crouty in library Clips Musiques Plex: Generating watched for crouty in library Prototypes Plex: Generating watched for tidam in library Films Plex: Generating watched for tidam in library Animés Plex: Generating watched for tidam in library Desssins Animés Plex: Generating watched for tidam in library Séries Plex: Generating watched for tidam in library Musique Plex: Generating watched for tidam in library Clips Musiques Plex: Generating watched for tidam in library Prototypes Plex: Generating watched for demonangex in library Films Plex: Generating watched for demonangex in library Animés Plex: Generating watched for demonangex in library Desssins Animés Plex: Generating watched for demonangex in library Séries Plex: Generating watched for demonangex in library Musique Plex: Generating watched for demonangex in library Clips Musiques Plex: Generating watched for demonangex in library Prototypes Jellyfin: Generating watched for crouty in library Films Jellyfin: Generating watched for crouty in library Animés Jellyfin: Generating watched for crouty in library Séries Jellyfin: Generating watched for demonangex in library Films Jellyfin: Generating watched for demonangex in library Séries Jellyfin: Generating watched for demonangex in library Animés Jellyfin: Generating watched for geonossis in library Films Jellyfin: Generating watched for geonossis in library Séries Jellyfin: Generating watched for jibjoub in library Animés Jellyfin: Generating watched for jibjoub in library Films Jellyfin: Generating watched for jibjoub in library Séries Syncing Jellyfin DemonAngeXNAS: 10.9.11 -> Plex DemonAngeXNAS: 1.40.1.8227-c0dd5a73e [MARK]: Plex: S.W.A.T. La balle de trop as watched for DemonAngeX in Séries [ERROR]: Plex: Failed to update watched for DemonAngeX in library Séries, Error: (500) internal_server_error; http://192.168.50.250:32400/:/scrobble?key=15099&identifier=com.plexapp.plugins.library Internal Server Error

500 Internal Server Error

[ERROR]: Traceback (most recent call last): File "/app/src/plex.py", line 356, in update_user_watched episode_search.markWatched() File "/usr/local/lib/python3.11/site-packages/plexapi/mixins.py", line 325, in markWatched self.markPlayed() File "/usr/local/lib/python3.11/site-packages/plexapi/mixins.py", line 308, in markPlayed self._server.query(key, params=params) File "/usr/local/lib/python3.11/site-packages/plexapi/server.py", line 770, in query raise BadRequest(message) plexapi.exceptions.BadRequest: (500) internal_server_error; http://192.168.50.250:32400/:/scrobble?key=15099&identifier=com.plexapp.plugins.library Internal Server Error

500 Internal Server Error

Syncing Plex DemonAngeXNAS: 1.40.1.8227-c0dd5a73e -> Jellyfin DemonAngeXNAS: 10.9.11 [MARK]: Jellyfin: 30 jours max as partially watched for 66 minutes for abou203 in Films [ERROR]: Jellyfin: Error updating watched for abou203 in library Films, [Errno 2] No such file or directory: '' [ERROR]: Traceback (most recent call last): File "/app/src/jellyfin_emby.py", line 594, in update_user_watched log_marked( File "/app/src/functions.py", line 53, in log_marked with open(f"{mark_file}", "a", encoding="utf-8") as file: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: ''

[ERROR]: Jellyfin: Error updating watched, [Errno 2] No such file or directory: '' [ERROR]: [Errno 2] No such file or directory: '' [ERROR]: Traceback (most recent call last): File "/app/src/jellyfin_emby.py", line 594, in update_user_watched log_marked( File "/app/src/functions.py", line 53, in log_marked with open(f"{mark_file}", "a", encoding="utf-8") as file: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/src/jellyfin_emby.py", line 838, in update_watched self.update_user_watched( File "/app/src/jellyfin_emby.py", line 752, in update_user_watched raise Exception(e) Exception: [Errno 2] No such file or directory: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/src/main.py", line 225, in main main_loop() File "/app/src/main.py", line 210, in main_loop server_2[1].update_watched( File "/app/src/jellyfin_emby.py", line 850, in update_watched raise Exception(e) Exception: [Errno 2] No such file or directory: ''

Retrying in 1800.0

Type:

Additional context

luigi311 commented 1 month ago

Not sure why you are getting that 500 internal error but the second error is in relation to #200

luigi311 commented 2 weeks ago

Can you try again, i updated the unraid template to have a default value for the mark_file which should fix the issue. Feel free to open the ticket again if its still an issue. MARK_FILE should now default to /tmp/mark.log