Kometa-Team / ImageMaid

Python 3 Script for Cleaning Up Images in Plex
MIT License
297 stars 16 forks source link

Windows UNC paths fail only on --mode move #39

Open planetrocky opened 8 months ago

planetrocky commented 8 months ago

Version Number

b16ddd7f09716daab4f756f13e293ef2bb1ec973

What branch are you on?

master

Describe the Bug

C:\Plex-Image-Cleanup>python --version
Python 3.12.2

mode report executes correctly. mode remove executes correctly. mode move fails:

| Moving Bloat Images:   0%|                                                                                                                                                                 | 0/2242 [00:00<?, ? moved/s]
| MOVE: \\fs2\docker\plex\Library\Application Support\Plex Media Server\Metadata\Movies\0\009788157bc680044f3e2b4242b71ebfc62391d.bundle\Uploads\posters\a2068253ece2349286b36c87bb14e3dac23c1658 --> \\fs2\docker\plex\Library\Application Support\Plex Media Server\PIC Restore\Movies\0\009788157bc680044f3e2b4242b71ebfc62391d.bundle\Uploads\posters\a2068253ece2349286b36c87bb14e3dac23c1658.jpg |
| Traceback (most recent call last):                                                                 |
|   File "E:\Plex-Image-Cleanup\plex_image_cleanup.py", line 321, in run_plex_image_cleanup |
|     util.move_path(path, meta_dir, restore_dir, suffix=".jpg")                                     |
|   File "E:\Plex-Image-Cleanup\pic-venv\Lib\site-packages\pmmutils\util.py", line 60, in move_path |
|     final_path.parent.mkdir(exist_ok=True)                                                         |
|   File "C:\Users\name\AppData\Local\Programs\Python\Python312\Lib\pathlib.py", line 1311, in mkdir |
|     os.mkdir(self, mode)                                                                           |
| FileNotFoundError: [WinError 3] The system cannot find the path specified: '\\\\fs2\\docker\\plex\\Library\\Application Support\\Plex Media Server\\PIC Restore\\Movies\\0\\009788157bc680044f3e2b4242b71ebfc62391d.bundle\\Uploads\\posters' |
|                                                                                                    |
| [WinError 3] The system cannot find the path specified: '\\\\fs2\\docker\\plex\\Library\\Application Support\\Plex Media Server\\PIC Restore\\Movies\\0\\009788157bc680044f3e2b4242b71ebfc62391d.bundle\\Uploads\\posters' |

Logs

No response

tylerreed19 commented 5 months ago

Same issue on Local Windows install:

| Moving Bloat Images                                                                                |
| Moving Bloat Images:   0%|                                                               | 0/174 [00:00<?, ? moved/s]
| MOVE: C:\Users\*USER*\AppData\Local\Plex Media Server\Metadata\Collections\0\68a9fe6195b8df5fa70e74773d9297e22d822a8.bundle\Uploads\themes\81eb011c917abe0d895483a8ef35b889a97e5813 --> C:\Users\*USER*\AppData\Local\Plex Media Server\PIC Restore\Collections\0\68a9fe6195b8df5fa70e74773d9297e22d822a8.bundle\Uploads\themes\81eb011c917abe0d895483a8ef35b889a97e5813.jpg |
| Traceback (most recent call last):                                                                 |
|   File "C:\Users\*USER*\ImageMaid-1.0.2\plex_image_cleanup.py", line 321, in run_plex_image_cleanup |
|     util.move_path(path, meta_dir, restore_dir, suffix=".jpg")                                     |
|   File "C:\Users\*USER*\AppData\Local\Programs\Python\Python311\Lib\site-packages\pmmutils\util.py", line 60, in move_path |
|     final_path.parent.mkdir(exist_ok=True)                                                         |
|   File "C:\Users\*USER*\AppData\Local\Programs\Python\Python311\Lib\pathlib.py", line 1116, in mkdir |
|     os.mkdir(self, mode)                                                                           |
| FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\*USER*\\AppData\\Local\\Plex Media Server\\PIC Restore\\Collections\\0\\68a9fe6195b8df5fa70e74773d9297e22d822a8.bundle\\Uploads\\themes' |
|                                                                                                    |
| [WinError 3] The system cannot find the path specified: 'C:\\Users\\*USER*\\AppData\\Local\\Plex Media Server\\PIC Restore\\Collections\\0\\68a9fe6195b8df5fa70e74773d9297e22d822a8.bundle\\Uploads\\themes' |