Closed 60north closed 7 years ago
Hi, The try-catch in models.py is really old code, IIRC it was due to an issue importing from PIL on some distributions (Ubuntu? maybe). I've removed it all (master branch), on the assumption that everyone uses Pillow nowadays and that the importing issues have all be resolved. Can you test the master branch and check if your issue with smaller photo sizes has been resolved?
yep, it's gone now.
Thanks for checking it. I will now close this issue.
I have met with the same problem as many people before me - in virtualenv environment with pillow installed smaller photo sizes where not created when new image added.
I was able to identify the source of the problem. In short, if you use from PIL import Image instead of import Image all works fine. In models.py code there's a try-catch that tries first to import Image and then PIL import Image. First one succeeds. When create_size() tries to load the image for resize, it gets IOError: cannot identify image file which is quietly swallowed by create_size() for some reason.
quick google shows it is a known problem in pillow, i do not have time now (project deadline), does anybody want to look it up? i just commented the first half of imports to deploy on production, but it is a bad bad solution, of course.
here's a pull in pillow with similar problem https://github.com/python-pillow/Pillow/pull/1898