Hi!
I'm trying to use django-jet in my Django application in version 3.1, but I'm getting the following ERROR:
ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding'
In:
File "/usr/local/lib/python3.8/site-packages/jet/models.py", line 3, in
from django.utils.encoding import python_2_unicode_compatible
I did some searching on the internet and found that this was removed in Django 3.0 or higher.
https://forum.djangoproject.com/t/importerror-cannot-import-name-python-2-unicode-compatible-from-django-utils-encoding/4336
https://stackoverflow.com/questions/59583726/django-importerror-cannot-import-name-python-2-unicode-compatible
Use the django3 version of Jet: pip install django-3-jet
pip install six
replace django.utils with six
from six import python_2_unicode_compatible
Most helpful comment
Use the django3 version of Jet:
pip install django-3-jet