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

server error with django-phonenumber-field 4.0.0 #4189

Open
Chrescht opened this issue Oct 22, 2023 · 0 comments
Open

server error with django-phonenumber-field 4.0.0 #4189

Chrescht opened this issue Oct 22, 2023 · 0 comments

Comments

@Chrescht
Copy link

Chrescht commented Oct 22, 2023

Issue Summary

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

  1. 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
  2. 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.

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

No branches or pull requests

1 participant