You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Server error with ImportError: cannot import name 'force_text' from 'django.utils.encoding' and Django 4.2.6
In Django 4 force_text has been replaced by force_str
Steps to Reproduce
Install django-phonenumber-field 4.0.0 as required by django-oscar 3.2.2 django-oscar 3.2.2 requires django-phonenumber-field<7.0.0,>=4.0.0, but you have django-phonenumber-field 7.2.0 which is incompatible
server error, log will show:
File "/opt/django/env/lib/python3.10/site-packages/phonenumber_field/modelfields.py", line 4, in
from django.utils.encoding import force_text
ImportError: cannot import name 'force_text' from 'django.utils.encoding' (/opt/django/env/lib/python3.10/site-packages/django/utils/encoding.py)
Technical details
Python version: 3.10.12
Django version: 4.2.6
Oscar version: 3.2.2
So far oscar runs fine with django-phonenumber-field 7.2.0.
The text was updated successfully, but these errors were encountered:
Issue Summary
Server error with
ImportError: cannot import name 'force_text' from 'django.utils.encoding'
and Django 4.2.6In Django 4
force_text
has been replaced byforce_str
Steps to Reproduce
django-oscar 3.2.2 requires django-phonenumber-field<7.0.0,>=4.0.0, but you have django-phonenumber-field 7.2.0 which is incompatible
File "/opt/django/env/lib/python3.10/site-packages/phonenumber_field/modelfields.py", line 4, in
from django.utils.encoding import force_text
ImportError: cannot import name 'force_text' from 'django.utils.encoding' (/opt/django/env/lib/python3.10/site-packages/django/utils/encoding.py)
Technical details
So far oscar runs fine with django-phonenumber-field 7.2.0.
The text was updated successfully, but these errors were encountered: