Plex-Auto-Collections
Plex-Auto-Collections copied to clipboard
Tautulli most popular causes error if movie or series is deleted
If a movie or show that is in a tautulli list is removed from the server, then the metadata of that show will be missing from plex. As the program tries to add that item, it will cause a crash.
| Processing tautulli: {'list_type': 'popular', 'list_days': 365, 'list_size': 25, 'list_buffer': 20}
Traceback (most recent call last):
File "C:\Plex\Plex-Auto-Collections-master\app\plex_auto_collections.py", line 1026, in <module>
update_from_config(config_path, plex, True, args.no_meta, args.no_images)
File "C:\Plex\Plex-Auto-Collections-master\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 "C:\Plex\Plex-Auto-Collections-master\app\plex_tools.py", line 265, in add_to_collection
items, missing = imdb_tools.get_tautulli(config_path, plex, value)
File "C:\Plex\Plex-Auto-Collections-master\app\imdb_tools.py", line 255, in get_tautulli
matched.append(plex.Library.fetchItem(item['rating_key']))
File "C:\Python39-32\lib\site-packages\plexapi\base.py", line 139, in fetchItem
for elem in self._server.query(ekey):
File "C:\Python39-32\lib\site-packages\plexapi\server.py", line 448, in query
raise NotFound(message)
plexapi.exceptions.NotFound: (404) not_found; http://192.168.2.11:32400/library/metadata/187730 <html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>
Maybe this error can be caught and skipped, so that it does not end the program?
I'm having this same issue. I moved some movies around to different drives and now it's throwing this error when it gets to the Tautulli Most Popular Movies part of my script.
Edit: I just moved the tautulli related parts of my script to the very end. Works for now.