bexem / PlexCache

Automate Plex media management: Efficiently transfer media from the On Deck/Watchlist to the cache, and seamlessly move watched media back to their respective locations.
58 stars 7 forks source link

CRITICAL - Error checking free space and moving media files to the array: [Errno 2] No such file or directory: #30

Open dominikheiss opened 2 months ago

dominikheiss commented 2 months ago

Hey,

there is this particular error which seems to come up more often on my Unraid system. Sometimes I can fix it via clearing the "plexcache_watched_cache.json" file, but right now it just does not want to work.

I also deleted the particular file it can't find or move but I get the same error. Newest version of the script, newest Unraid.

Do you have any hints for me to fix that? :)

dominikheiss commented 2 months ago

https://pastebin.com/FuKsu0GG

https://pastebin.com/p8f58gEm

bexem commented 2 months ago

Is there anything that could cause permission changes to the files the script is trying to interact with? It is worth checking if there are any other software programs interacting with the same files and changing permissions. Additionally, ensure that the script itself has the correct permissions to access those files. It might still be the script having some issues, I'm (very) slowly working towards an update, either way the file/folder operations the script use are basic phyton commands, nothing fancy.

dominikheiss commented 2 months ago

Yeah it could just be permissions. I just did a fresh "chmod" and "chown" over the whole media library...but as I am also using the "folder caching" plugin, there could be some issues with that.

I also cleared the whole Plexcache folder to rule out other errors....

//Edit: Now it works...but sadly I changed too much at the same time to know exactly what it was :/ Thanks for your help!

aormond commented 2 months ago

Hi! I just set up the script and I also got this error. I think I tracked down the cause of the error (at least in my case).

My 'plex_library_folder' is 'tv' and the corresponding 'nas_library_folder' is 'television'.

The file that the script said it couldn't find was ''/mnt/user/television/Ghosts (2019) [imdb-tt8594324]/Season 05/Ghosts (2019) - S05E01 - Fools [HDTV-1080p][AAC 2.0][h264]-uktelevision.mkv''. However, the actual file path is '/mnt/user/television/Ghosts (2019) [imdb-tt8594324]/Season 05/Ghosts (2019) - S05E01 - Fools [HDTV-1080p][AAC 2.0][h264]-uktv.mkv'.

So you'll notice the script replaced 'uktv' at the end of the filename with 'uktelevision', and so of course it couldn't find the file. So probably modify_file_paths() needs to be less aggressive about finding matches when it replaces the plex library folder.