django-imagekit icon indicating copy to clipboard operation
django-imagekit copied to clipboard

StringIO import error

Open robline opened this issue 4 years ago • 2 comments

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 avatar Jul 27 '20 16:07 robline

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

robline avatar Jul 27 '20 18:07 robline

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?

vstoykov avatar Oct 13 '21 21:10 vstoykov