django-simple-captcha
django-simple-captcha copied to clipboard
Incompatible to Pillow v.8.3.1
Hello, today we discovered, that this app breaks an entiere Django project if you're using current Pillow version 8.3.1. The application then just stops on boot with exit code -1. No exception, no error. Just exit code -1.
Rollback to Pillow 8.3.0 solved this problem.
Pillow is not pinned in the dependencies, so the test suite runs with the latest version by default, and 8.3.1 seems to be perfectly fine.

So, what version of Python, Django, and OS are experiencing this on?
Hmm..., this is odd.
You're right. I tried it on another machine today. And it works there. Yesterday on the 2 machines of other developers it didn't work.
What really puzzeled me was the exit code -1. This was very frustrating since you don't get any usefull information. You just see it doesn't work. So we did it like in the good old days with some print outs. We discovered we're reaching the urls.py from the project core. By simple trial & error we saw that the exit code -1 was thrown when the URLs from captcha were integrated.
At that time we knew it has to be captcha. After some more time we narrowed it down to pillows 3.8.1 & tried a reverse to the last known version were it worked. This was 3.8.0.
But as said before, on the 3rd machine today it works?!? I think then this is not really an issue of captcha and/or pillow. Maybe it's machine specific.
By the way, all machines run Python 3.8 / 3.9 on Windows 10. One dev uses Pycharm, the other IntelliJ with Python plugin.
This is our requirements: requirements.txt
If I discover what's going on, I maybe reopen this issue...
What wsgi server is this on? mod_wsgi / gunicorn / ?
Also, in my experience random exit code -1 crashes could be related to out of memory issues. Check your server / machine logs!
This is not running on any server. This was on the developer machines. What's Djangos standard dev server? I think it's Grunt?!?
OK..., since we now change to Python 3.10, I can't no longer ignore this issue, since Pillow does not support v.8.3.0 for Python 3.10. Minimum version is v.8.3.2 as you can see in the Pillow DOCs.
But not everything is lost, I managed to pin point the problem: The problem comes with GeoDjango and this library. I can provide a minimalistic example:
- Create a new Django Project (don't even need any app)
- Add GeoDjango support (How to install GeoDjango)
- Add django-simple-captcha
(Here are the requirements.txt)
That's it. Your now not able to start or even make a migration, as you can see here from the exit code:
(The configurations you see there, are for Windows Users which use the SpatialLite (SQLite) database, not the PostGIS (PostgreSQL) one.)
As I mentioned half a year ago, this works with Pillow 8.3.0 ?!?
Not a django-simple-captcha issue, closing.