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

ugettext_lazy is removed from Django 4 #5

Open
zyunx opened this issue Oct 24, 2022 · 1 comment
Open

ugettext_lazy is removed from Django 4 #5

zyunx opened this issue Oct 24, 2022 · 1 comment

Comments

@zyunx
Copy link

zyunx commented Oct 24, 2022

I use Django 4.

The below error occurs, when I use this lib.

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    main()
  File "manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/Users/yun/Workshop/Projects/zelixir-enterprise/zelixir-server-enterprise/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/Users/yun/Workshop/Projects/zelixir-enterprise/zelixir-server-enterprise/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 420, in execute
    django.setup()
  File "/Users/yun/Workshop/Projects/zelixir-enterprise/zelixir-server-enterprise/venv/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Users/yun/Workshop/Projects/zelixir-enterprise/zelixir-server-enterprise/venv/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/Users/yun/Workshop/Projects/zelixir-enterprise/zelixir-server-enterprise/venv/lib/python3.8/site-packages/django/apps/config.py", line 126, in create
    mod = import_module(mod_path)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/yun/Workshop/Projects/zelixir-enterprise/zelixir-server-enterprise/venv/lib/python3.8/site-packages/distributedlock/apps.py", line 2, in <module>
    from django.utils.translation import ugettext_lazy as _
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' (/Users/yun/Workshop/Projects/zelixir-enterprise/zelixir-server-enterprise/venv/lib/python3.8/site-packages/django/utils/translation/__init__.py)

The cause are that ugettext_lazy is removed from Django 4

Ref:
https://stackoverflow.com/questions/70656495/importerror-cannot-import-name-ugettext-lazy
https://code.djangoproject.com/ticket/30165

@wookiee89
Copy link

Same issue here, any timeline on fix? Or merging in the PR associated to fixing this?

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

2 participants