Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 4.0 ImportError: cannot import name 'force_text' from 'django.utils.encoding' #86

Closed
mikekeda opened this issue Dec 18, 2021 · 0 comments · Fixed by #88
Closed
Milestone

Comments

@mikekeda
Copy link
Contributor

I upgraded Django to 4.0 and I'm getting an error:

  File "//easy_select2/__init__.py", line 1, in <module>
    from easy_select2.utils import select2_modelform_meta, select2_modelform, \
  File "easy_select2/utils.py", line 5, in <module>
    from easy_select2 import forms as es2_forms
  File "easy_select2/forms.py", line 4, in <module>
    from django.utils.encoding import force_text
ImportError: cannot import name 'force_text' from 'django.utils.encoding' (django/utils/encoding.py)

We need to change force_text to force_str

@hartwork hartwork added this to the 1.5.8 milestone Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants