Closed jwoodhouse closed 4 months ago
Okay. It need a try statement so it doesn't die on that. I'll get to that when I get back from holiday.
Updated dev branch, can you please test this to see if this is fixed.
Just pulled the dev docker image down, getting a slightly different error:
Finished running sync_gdrive
An error occurred:
Traceback (most recent call last):
File "/app/modules/poster_renamerr.py", line 642, in main
results = handle_starr_data(app, server_name, instance_type, include_episode=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/util/utility.py", line 580, in handle_starr_data
'season_has_episodes': season['statistics']['episodeCount'] > 0,
~~~~~~^^^^^^^^^^^^^^
KeyError: 'statistics'
https://github.com/Drazzilb08/daps/commit/8b90f7394501e83209cacb13251aa72e35761fd7#diff-67b18f147213369955c00b435674927a17a57eb8e897cc69a9fa20b19a613ebfR580 I think this line might be the culprit?
In any case, thanks for taking a look!
I think you're 100% correct, please update and try again. Lemme know if the error persists.
Looks good now, I can see kometa setting up posters for shows in that sonarr instance.
Thanks for the help!
No worries. Glad this is fixed. Closing the issue.
Error:
Looks like this section of code causes it: https://github.com/Drazzilb08/daps/blob/c86f81fec8c3974b2ced1c768e270186c0dbb814/util/utility.py#L571-L577
I did some fairly basic debugging on my end (since my Python is not so great) to make it print out the season_data for each series it iterates over in the Sonarr instance which is causing the above error.
In my case one of the series causing an error seems to be
Kamichu!
which seems to be lacking astatisctics
key for Season 0 (Specials).I can see that this series has an entry for
Specials
but no episodes in there, so a bit of an edge case.No clue how to update the code elegantly to handle this, maybe by using
dict.get
instead of just grabbing thestatistics
key? In my debugging modifications this got it to print outNone
instead of getting aKeyError