AttributeError: 'PngImageFile' object has no attribute 'applist'
Closed this issue · 8 comments
I followed the installation instructions but I'm not able to run the generate script.
.env
INPUT_PATH=/media/chains/deepdream/output/
./generate_site.sh
Importing album /media/chains/deepdream/output/IMG_7065 as 'IMG_7065'
Importing album /media/chains/deepdream/output/IMG_2266 as 'IMG_2266'
--> Processing /media/chains/deepdream/output/IMG_2266/IMG_2266-30494809905-default-vgg19.png...
------> Generating photo sizes: 500x375 800x600 1024x768 1200x900
Traceback (most recent call last):
File "/media/chains/deepdream/repos/fussel/./fussel.py", line 74, in
generator.generate_site(output_photos_path, output_data_path, http_root)
File "/media/chains/deepdream/repos/fussel/generator/generate.py", line 360, in generate_site
self.process_album(album_dir, album_name, output_albums_photos_path, external_root)
File "/media/chains/deepdream/repos/fussel/generator/generate.py", line 318, in process_album
photo_data = self.process_photo(external_path, photo_file, album_folder)
File "/media/chains/deepdream/repos/fussel/generator/generate.py", line 102, in process_photo
faces = self.extract_faces(new_original_photo)
File "/media/chains/deepdream/repos/fussel/generator/generate.py", line 232, in extract_faces
for segment, content in im.applist:
AttributeError: 'PngImageFile' object has no attribute 'applist'
.PNG files are the issue... I'm not unfamiliar with Python to locate the cause
After some meditating over extract_faces - I disable PEOPLE_ENABLE. The generate script is now create successful result.
The face extractions doesn't work for PNG.
@MasterLamp Interesting. I have some PNG's that work, I wonder if there is a non-XMP format embedded in yours? Do you have an example image that you would be willing to share so I can see what the difference might be?
@cbenning Sure, use this picture. That is one from my initial post.
Because the picture is generated by my box (via deepdream) it may doesn't have all the meta data of a PNG.
It appears one still needs to disable face recognition to use PNG images (at least with the docker image). Should we leave this issue open for visibility of the workaround?
Works for me
Ive implemented a fix in both master and v2, which just ignores face detection if applist attribute missing
I recommend giving v2 a try as well, it has many improvements