fussel icon indicating copy to clipboard operation
fussel copied to clipboard

AttributeError: 'PngImageFile' object has no attribute 'applist'

Open MasterLamp opened this issue 3 years ago • 6 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'

MasterLamp avatar Apr 16 '21 14:04 MasterLamp

.PNG files are the issue... I'm not unfamiliar with Python to locate the cause

MasterLamp avatar Apr 16 '21 14:04 MasterLamp

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 avatar Apr 16 '21 14:04 MasterLamp

@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 avatar Apr 16 '21 19:04 cbenning

@cbenning Sure, use this picture. That is one from my initial post.
IMG_2266-30494809905-default-vgg19

Because the picture is generated by my box (via deepdream) it may doesn't have all the meta data of a PNG.

MasterLamp avatar Apr 19 '21 10:04 MasterLamp

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?

winny- avatar Sep 28 '22 23:09 winny-

Works for me

cbenning avatar Sep 29 '22 02:09 cbenning

Ive implemented a fix in both master and v2, which just ignores face detection if applist attribute missing

cbenning avatar Feb 13 '23 04:02 cbenning

I recommend giving v2 a try as well, it has many improvements

cbenning avatar Feb 13 '23 04:02 cbenning