Django-jet: python_2_unicode_compatible

Created on 4 Dec 2019  路  12Comments  路  Source: geex-arts/django-jet

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()

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

All 12 comments

@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:

  • go to ~/..../virtualenv/your_project/lib/python3.6/site-packages/jet

    • copy all jet forlder to /your_project

  • in your_project/jet/models.py

    • delete all python_2_unicode_compatible(import, decorator):

Done! Issue Resolved!

For this Error Use new version of Django Jet 2
Use:- pip install r-django-jet

https://pypi.org/project/r-django-jet/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ramses132 picture ramses132  路  3Comments

uroybd picture uroybd  路  5Comments

pwndr00t picture pwndr00t  路  4Comments

seenu4linux picture seenu4linux  路  3Comments

andreamanni picture andreamanni  路  4Comments