[Bug] Pillow-Resource-Leak: Image.open() ohne with-Statement #18
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
analyzer.py:21,analyzer.py:66:Bei vielen Bildern -> OSError: [Errno 24] Too many open files.
Fix
Alle
Image.open()-Stellen in analyzer.py und processor.py pruefen.Fix umgesetzt:
analyzer.py:_mean_brightness->with Image.open(...)analyzer.py:find_duplicates->with Image.open(...) as img: phash(img)processor.py:get_exif_info->with Image.open(...)processor.py:apply_image_watermark->with Image.open(wm_path) as wm_srcprocessor.py:process_photo->with Image.open() as src: src.load(); img = src.copy()(Copy noetig weil img nach with weiter verwendet wird)server.pyHEIC-Konvertierung ->with Image.open(io.BytesIO(raw)) as srcManueller Test: 3 Bilder analysiert, FD-Count stabil bei 15.