mza921 / Plex-Auto-Collections

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

Permission denied error #238

Open tshives26 opened 2 years ago

tshives26 commented 2 years ago

Had a little Plex issue and after solving that I've realized the auto collections no longer work. I'm getting some permissions denied and was hoping this is an easy fix someone would be so kind to help me with.

Running on Synology DSM7. Here are some of the errors but please let me know if I can provide anything further to assist.

Version 2.9.0
| Locating config...
| Using /volume1/docker/plex-auto-collections/config/config.yml as config
|===============================================================================                                                                                                                                                             ====================|
| Connecting to Plex...
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
| Plex Connection Successful
|===============================================================================                                                                                                                                                             ====================|
| Connecting to TMDb...
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
| TMDb Connection Successful
|===============================================================================                                                                                                                                                             ====================|
| Connecting to tautulli...
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
| tautulli Connection Successful
|===============================================================================                                                                                                                                                             ====================|
| trakt attribute not found
|===============================================================================                                                                                                                                                             ====================|
| radarr attribute not found
|===============================================================================                                                                                                                                                             ====================|
| image_server attribute not found
|===============================================================================                                                                                                                                                             ====================|
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
|
| Update Collections from Config? (y/n): y
|
|===============================================================================                                                                                                                                                             ====================|
|
| Mapping Plex Movies
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
| Cache | ! | plex://movie/5eb0033458f4e80045bc40ab          | Unable to map TMDb/IMDb ID for Have a Good Trip: Adventures in Psychedelics
| Processed 2099 Movies
|
| Running collection update press Ctrl+C to abort at anytime
|
|===================================================================================================|
|
| Updating collection: In Theaters!...
| Sync Mode: sync
| Config Error: Collection In Theaters! Not Found
|
| Processing tmdb_now_playing: 30
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
| Processing tmdb_now_playing: 30 Items
| In Theaters! Collection | + | The Vault
| In Theaters! Collection | + | After We Fell
| In Theaters! Collection | + | Ainbo
| In Theaters! Collection | + | The Unholy
| In Theaters! Collection | + | Black Water: Abyss
| In Theaters! Collection | + | The Misfits
| Processed 6 Movies
| 34 missing movies from TMDb Now Playing: Top 30
|
|
|===================================================================================================|
|
| Updating collection: Popular - Private Stash (Past 30 Days)...
| Sync Mode: sync
| Config Error: Collection Popular - Private Stash (Past 30 Days) Not Found
| Config Error: tautulli sub-attribute list_buffer not found using 20 as default
|
| Processing tautulli: {'list_type': 'popular', 'list_days': 15, 'list_size': 10, 'list_buffer': 20}
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
/bin/cp: cannot create regular file '/tmp/synoproxy.conf': Permission denied
Traceback (most recent call last):
  File "plex_auto_collections.py", line 1035, in <module>
    update_from_config(config_path, plex, False)
  File "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 "/volume1/docker/plex-auto-collections/app/plex_tools.py", line 265, in add_to_collection
    items, missing = imdb_tools.get_tautulli(config_path, plex, value)
  File "/volume1/docker/plex-auto-collections/app/imdb_tools.py", line 250, in get_tautulli
    matched.append(plex.Library.fetchItem(item['rating_key']))
  File "/var/services/homes/tshives26/.local/lib/python3.8/site-packages/plexapi/base.py", line 155, in fetchItem
    for elem in self._server.query(ekey):
  File "/var/services/homes/tshives26/.local/lib/python3.8/site-packages/plexapi/server.py", line 531, in query
    raise NotFound(message)
plexapi.exceptions.NotFound: (404) not_found; http://192.168.26.69:32400/library/metadata/33800 <html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>
tshives26 commented 2 years ago

So I got the first issue fixed by a simple reinstall and running the command in sudo. Not sure if I like that as I'm worried the auto-run won't run in sudo and fail, we'll see tonight. Seems its blocking perms on my Tautulli though now. Any idea how to solve this one please?

| Updating collection: Popular - Private Stash (Past 30 Days)...
| Sync Mode: sync
| Config Error: tautulli sub-attribute list_buffer not found using 20 as default
|
| Processing tautulli: {'list_type': 'popular', 'list_days': 15, 'list_size': 10, 'list_buffer': 20}
Traceback (most recent call last):
  File "plex_auto_collections.py", line 1026, in <module>
    update_from_config(config_path, plex, True, args.no_meta, args.no_images)
  File "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 "/volume1/docker/plex-auto-collections/app/plex_tools.py", line 265, in add_to_collection
    items, missing = imdb_tools.get_tautulli(config_path, plex, value)
  File "/volume1/docker/plex-auto-collections/app/imdb_tools.py", line 250, in get_tautulli
    matched.append(plex.Library.fetchItem(item['rating_key']))
  File "/usr/lib/python3.8/site-packages/plexapi/base.py", line 155, in fetchItem
    for elem in self._server.query(ekey):
  File "/usr/lib/python3.8/site-packages/plexapi/server.py", line 531, in query
    raise NotFound(message)
plexapi.exceptions.NotFound: (404) not_found; http://192.168.26.69:32400/library/metadata/33800 < html>< head>< title>Not Found< /title>< /head>< body>< h1>404 Not Found< /h1>< /body>< /html>
meisnate12 commented 2 years ago

development here has stalled check out the updated Plex Meta Manager.