cbenning / fussel

A static photo gallery generator
https://github.com/cbenning/fussel
MIT License
260 stars 17 forks source link

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

Closed MasterLamp closed 1 year ago

MasterLamp commented 3 years ago

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 commented 3 years ago

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

MasterLamp commented 3 years ago

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.

cbenning commented 3 years ago

@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?

MasterLamp commented 3 years ago

@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.

winny- commented 1 year ago

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?

cbenning commented 1 year ago

Works for me

cbenning commented 1 year ago

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

cbenning commented 1 year ago

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