matthewwithanm / django-imagekit

Automated image processing for Django. Currently v4.0
http://django-imagekit.rtfd.org/
BSD 3-Clause "New" or "Revised" License
2.26k stars 276 forks source link

StringIO import error #505

Open robline opened 4 years ago

robline commented 4 years ago

I cannot get imagekit to import StringIO. When I follow the suggestions in the doc in a shell, I get ModuleNotFoundError: No module named 'StringIO'. There is nothing in the docs about supported python versions. Is there an incompatibility with Python 3.7?

In [4]: from imagekit.models import ProcessedImageField                                                                                
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-4-10ab3692e0af> in <module>
----> 1 from imagekit.models import ProcessedImageField

~/.virtualenvs/myproject/lib/python3.7/site-packages/imagekit/models.py in <module>
      1 import os
      2 import datetime
----> 3 from StringIO import StringIO
      4 
      5 from django.core.files.base import ContentFile

ModuleNotFoundError: No module named 'StringIO'
robline commented 4 years ago

It turns out to be a version issue. https://django-imagekit.readthedocs.io/en/latest/ lists 1.1.0 as the latest release.

vstoykov commented 2 years ago

The latest version of django-imagekit is 4.0.2. There is probably some problem with the autoupdate of the documentation in the read the docs. With using the latest version of django-imagekit everything works riht? If yes can you close the issue?