Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing "PIC Restore" folder #28

Open
NooNameR opened this issue Jan 17, 2024 · 10 comments
Open

Missing "PIC Restore" folder #28

NooNameR opened this issue Jan 17, 2024 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@NooNameR
Copy link

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:

image

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

@NooNameR NooNameR added the bug Something isn't working label Jan 17, 2024
@N0cky
Copy link

N0cky commented Jan 18, 2024

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

@xFlawless11x
Copy link

Can confirm same error for me running 1.0.2, docker on unraid. Running on 1.0.0 or 1.0. working fine.

@vCybah
Copy link

vCybah commented Jan 20, 2024

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.

@tylerreed19
Copy link

Having the same issue on a local Windows install as well. Time to downgrade I suppose.

@bullmoose20
Copy link

same here and seemingly unable to revert on both develop and latest the same error when using the MODE=move setting

@Gajotres
Copy link

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.

@dube920
Copy link

dube920 commented Apr 29, 2024

Same issue here, manually creating the folder doesn't help at all.

@dube920
Copy link

dube920 commented Apr 29, 2024

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.

@BartmanEH
Copy link

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.

@darac
Copy link

darac commented Sep 1, 2024

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:

  1. git clone the repository and fetch the requirements as per the documentation.
  2. Run plex_image_cleanup.py as you normally would and get a traceback as above.
  3. 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.
  4. On line 60, change:
    final_path.parent.mkdir(exist_ok=True)

to

    final_path.parent.mkdir(exist_ok=True, parents=True)
  1. Save the file, quit your editor, and re-run the plex_image_cleanup.py once more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests