mza921 / Plex-Auto-Collections

Python 3 script to automatically update Plex collections based off a configuration file
313 stars 29 forks source link

add_to_radarr crashes script #209

Open tehniemer opened 3 years ago

tehniemer commented 3 years ago

At some point, I'm not sure when, the script started failing when it was run. I had not made any config changes before or after the failure so I'm not sure of the cause, and the error output doesn't give me any hints that I can decipher. I'm running the latest docker image.

| Processed 74 Movies
| 19 missing movies from IMDb List: https://www.imdb.com/search/title/?groups=oscar_best_picture_winners&sort=year,desc
| Adding missing movies to Radarr
Traceback (most recent call last):
  File "/app/plex_auto_collections.py", line 1026, in <module>
    update_from_config(config_path, plex, True, args.no_meta, args.no_images)
  File "/app/plex_auto_collections.py", line 685, in update_from_config
    add_to_radarr(config_path, missing)
  File "/app/radarr_tools.py", line 71, in add_to_radarr
    print("| --- {}: {} {}".format(tmdb_title, response.json()[0]['errorMessage'], response.status_code))
KeyError: 0
tehniemer commented 3 years ago

That one seemed like it had something to do with the radarr integration, so I disabled all the instances of add_to_radarr: true in my config and the script made it further, but then hung up with this error.

| Processing trakt_list: https://trakt.tv/users/roven97/lists/thanksgiving-season
    update_from_config(config_path, plex, True, args.no_meta, args.no_images)
  File "/app/plex_auto_collections.py", line 668, in update_from_config
    missing, map = add_to_collection(config_path, plex, m, v, c, plex_map, map, filters)
  File "/app/plex_tools.py", line 258, in add_to_collection
    items, missing = trakt_tools.trakt_get_movies(config_path, plex, plex_map, value, method)
  File "/app/trakt_tools.py", line 51, in trakt_get_movies
    title_ids = [str(m.get_key('tmdb')) for m in trakt_list_items if isinstance(m, trakt.objects.movie.Movie)]
TypeError: 'NoneType' object is not iterable

I downgraded to 2.8.2 and had similar results.

Edit: this error seems like it was because the list no longer exists. The radarr issue still exists

DreamStatic commented 3 years ago

At some point, I'm not sure when, the script started failing when it was run. I had not made any config changes before or after the failure so I'm not sure of the cause, and the error output doesn't give me any hints that I can decipher. I'm running the latest docker image.

| Processed 74 Movies
| 19 missing movies from IMDb List: https://www.imdb.com/search/title/?groups=oscar_best_picture_winners&sort=year,desc
| Adding missing movies to Radarr
Traceback (most recent call last):
  File "/app/plex_auto_collections.py", line 1026, in <module>
    update_from_config(config_path, plex, True, args.no_meta, args.no_images)
  File "/app/plex_auto_collections.py", line 685, in update_from_config
    add_to_radarr(config_path, missing)
  File "/app/radarr_tools.py", line 71, in add_to_radarr
    print("| --- {}: {} {}".format(tmdb_title, response.json()[0]['errorMessage'], response.status_code))
KeyError: 0

I also am experiencing this same concern. Any updates/ideas on this issue? Thanks so much for sharing this AWESOME script. It really has filled a BIG hole Plex has with collections.

meisnate12 commented 3 years ago

development here has stalled check out the updated Plex Meta Manager you wont have this issue

DreamStatic commented 3 years ago

development here has stalled check out the updated Plex Meta Manager you wont have this issue

Ok, thank you for the tip. I will have a look.