ojengwa / django-simple-captcha

Automatically exported from code.google.com/p/django-simple-captcha
MIT License
1 stars 0 forks source link

Could not import captcha.views. Error was: No module named Image #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Steps for reproduce the problem:
1. Setup PIL=1.1.6 with code lies in namespace PIL
Usage example:
from PIL import Image, ImageDraw, ImageFont, ImageFilter
2. Use django-simple-captcha in django project

Result:
-------------------
Traceback (most recent call last):
...
ViewDoesNotExist: Could not import captcha.views. Error was: No module
named Image
-------------------

Need correct import from PIL in captcha.views:

import random
try:
    import Image, ImageDraw, ImageFont, ImageFilter
except:
    from PIL import Image, ImageDraw, ImageFont, ImageFilter

Original issue reported on code.google.com by cyk...@gmail.com on 12 Mar 2010 at 9:02

GoogleCodeExporter commented 9 years ago
Thank you. Fixed in r53.

Original comment by mbonetti on 12 Mar 2010 at 9:26

GoogleCodeExporter commented 9 years ago
had the same error, solved with this patch. Thanks!

isn't it time to release a new version on pypi?

Original comment by maurizio...@gmail.com on 9 Sep 2010 at 4:42

GoogleCodeExporter commented 9 years ago
Maurizio, you're probably right, let me fix a new package. 

Original comment by mbonetti on 10 Sep 2010 at 2:12