after install django v3 i got this error.
from django.utils.encoding import python_2_unicode_compatible
ImportError: cannot import name 'python_2_unicode_compatible'
i see this directory django.utils.encoding , python_2_unicode_compatible is not more exists.
and according to Django 3.0 release notes
django.utils.encoding.python_2_unicode_compatible() - Alias of six.python_2_unicode_compatible()
@zedrood Same. Haven't figured out a solution.
solution is use six.python_2_unicode_compatible() instead django.utils.encoding.python_2_unicode_compatible() according Django 3.0 release.
six is Utilities for writing code that runs on Python 2 and 3
pip install six
Same here...
180 issues
56 PRs
Is there any community edition being maintained?
R.I.P Jet.
You served well (kind of)
Is there any solution for this ?
Is there any solution for this ?
-> Just Go error file line 3~5
-> You will see following line
from django.utils.encoding import python_2_unicode_compatible
Replace this line with
from six import python_2_unicode_compatible
same issue
from django.utils.encoding import python_2_unicode_compatible
ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding' (/Users/juan/Documents/manu/dev/profarm_crm/venv/lib/python3.7/site-packages/django/utils/encoding.py)
Solution of @yasinkbas works, only not for a Docker deployment. Would be great if django 3 fix is approved into new version!
This version of django-jet works with Django3.0: https://pypi.org/project/django-3-jet/
To install use: pip install django-3-jet
Hi, I created a Fork from this project, which only removes python 2 support to work on python 3, greetings!
Six is used to support code can run on both python2 and python3
Most of us don't use Python2 anymore. So, we don't need to use six.
Customize Jet source code to fix the bug by:
~/..../virtualenv/your_project/lib/python3.6/site-packages/jetall jet forlder to /your_projectyour_project/jet/models.pypython_2_unicode_compatible(import, decorator):Done! Issue Resolved!
For this Error Use new version of Django Jet 2
Use:- pip install r-django-jet
Most helpful comment
This version of django-jet works with Django3.0: https://pypi.org/project/django-3-jet/
To install use:
pip install django-3-jet