Missing "PIC Restore" folder
Version Number
1.0.2
What branch are you on?
master
Describe the Bug
Hey folks, I have upgraded to new 1.0.2 quite recently and started to get this error for a move action (which worked and works on 1.0.0):
| Moving Bloat Images |
|====================================================================================================|
| Scanning Metadata Directory For Bloat Images: /plex/Metadata |
| Scanning Metadata for Bloat Images: 3121 directories [00:00, 6872.32 directories/s]
| 3 Bloat Images Found |
| Runtime: 0:00:00 |
| |
| Moving Bloat Images |
| Moving Bloat Images: 0%| | 0/3 [00:00<?, ? moved/s]
| MOVE: /plex/Metadata/TV Shows/b/78416367adb991d7a33bb85ae78dacb7a75e76b.bundle/Uploads/posters/1d0cbbf30dd7b97deaa70941ba9c57576b75f443 --> /plex/PIC Restore/TV Shows/b/78416367adb991d7a33bb85ae78dacb7a75e76b.bundle/Uploads/posters/1d0cbbf30dd7b97deaa70941ba9c57576b75f443.jpg |
| Traceback (most recent call last): |
| File "//plex_image_cleanup.py", line 321, in run_plex_image_cleanup |
| util.move_path(path, meta_dir, restore_dir, suffix=".jpg") |
| File "/usr/local/lib/python3.11/site-packages/pmmutils/util.py", line 60, in move_path |
| final_path.parent.mkdir(exist_ok=True) |
| File "/usr/local/lib/python3.11/pathlib.py", line 1116, in mkdir |
| os.mkdir(self, mode) |
| FileNotFoundError: [Errno 2] No such file or directory: '/plex/PIC Restore/TV Shows/b/78416367adb991d7a33bb85ae78dacb7a75e76b.bundle/Uploads/posters' |
| |
| [Errno 2] No such file or directory: '/plex/PIC Restore/TV Shows/b/78416367adb991d7a33bb85ae78dacb7a75e76b.bundle/Uploads/posters' |
|====================================================================================================|
| Critical Report |
|====================================================================================================|
| |
| Generic Criticals: |
| [Errno 2] No such file or directory: '/plex/PIC Restore/TV Shows/b/78416367adb991d7a33bb85ae78dacb7a75e76b.bundle/Uploads/posters' |
I'm running Plex Image Cleanup as a container on Unraid:
and my .env is:
PLEX_URL=http://plex:32400
PLEX_TOKEN=<redacted>
PLEX_PATH=/plex
MODE=report
SCHEDULE=07:00|daily|mode=move,09:00|weekly(sunday)|mode=clear,05:00|monthly(1)|mode=nothing;photo-transcoder=true
DISCORD=
TIMEOUT=600
SLEEP=60
PHOTO_TRANSCODER=False
EMPTY_TRASH=False
CLEAN_BUNDLES=False
OPTIMIZE_DB=False
TRACE=False
LOG_REQUESTS=False
Logs
No response
Can confirm, same error for me on 1.0.2 running with docker on a windows machine. After downgrading to 1.0.0 is working without a problem
Can confirm same error for me running 1.0.2, docker on unraid. Running on 1.0.0 or 1.0. working fine.
Same here, just found this script and v1.0.2 won't make the folders when in 'move' mode on Linux using the local install. (python 3.11) Downgrading to v1.0.1 seems to work as expected though.
Having the same issue on a local Windows install as well. Time to downgrade I suppose.
same here and seemingly unable to revert on both develop and latest the same error when using the MODE=move setting
I'm having the same problem.
This is not a permissions issue as I have made sure that the /plex folder is accessible and writable.
If I manually create a 'PIC Restore' folder, the process does not work as the 'PIC Restore' folder already exists.
Same issue here, manually creating the folder doesn't help at all.
Recreated docker using kometateam/imagemaid:develop (which is using version 1.0.3 atm), working fine. I'm guessing 1.0.2 and this branch will be killed off in the near future in favor of the rebranding.
I'm running a local install directly with Python. Had the same error of missing PIC Restore folder. I git cloned the develop branch and after reworking the command line to use the new branding python C:\Users\[redacted]\ImageMaid\imagemaid.py --plex [redacted] --url [redacted] --token [redacted] --mode move it seemed to work without error.
It looks like the pmmutils repository has gone offline (so my suggested fix there seems to have been lost).
Looking at the traceback, the problem is that PIC/ImageMaid is trying to create a directory, without the parent directory/ies existing.
You can fix this as follows:
git clonethe repository and fetch the requirements as per the documentation.- Run
plex_image_cleanup.pyas you normally would and get a traceback as above. - Look for the error stating e.g.
File "/usr/local/lib/python3.11/site-packages/pmmutils/util.py", line 60. This path might be different depending on where you've installed the requirements to. Edit this file with a text editor. - On line 60, change:
final_path.parent.mkdir(exist_ok=True)
to
final_path.parent.mkdir(exist_ok=True, parents=True)
- Save the file, quit your editor, and re-run the
plex_image_cleanup.pyonce more.