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
ImportError is raised when running python manage.py dbbackup from command line
To Reproduce
install with pip install django-dbbackup
add app 'dbbackup' to INSTALLED_APPS list in settings.py
add DBBACKUP_STORAGE and DBBACKUP_STORAGE_OPTIONS vars to settings.py as per docs setting the latter to an existing path in filesystem
run python manage.py dbbackup from command line
Expected behavior
Backup file to be created at appointed folder
Screenshots or reproduction
C:\...>python manage.py dbbackup
Traceback (most recent call last):
File "C:\...\manage.py", line 22, in <module>
main()
File "C:\...\manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "C:\...\venv\lib\site-packages\django\core\management\__init__.py", line 446, in execute_from_command_line
utility.execute()
File "C:\...\venv\lib\site-packages\django\core\management\__init__.py", line 420, in execute
django.setup()
File "C:\...\venv\lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\...\venv\lib\site-packages\django\apps\registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "C:\...\venv\lib\site-packages\django\apps\config.py", line 126, in create
mod = import_module(mod_path)
File "C:\Program Files\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\...\venv\lib\site-packages\dbbackup\apps.py", line 3, in <module>
from django.utils.translation import ugettext_lazy as _
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' (C:\...\venv\lib\site-packages\django\utils\translation\__init__.py)
Versions
Django-dbbackup
pypi: 3.3.0
External tools
Python: 3.10.3
Django: 4.0.3
OS: Windows 10 64bit
The text was updated successfully, but these errors were encountered:
I know one solution, but that not good idea!
Soo, dbbackup use ugettext_lazy, but now django v4 use only gettext_lazy. ugettext_lazy = gettext_lazy add
venv\lib\python3.10\site-packages\django\utils\translation_init_.py line 112
I know one solution, but that not good idea! Soo, dbbackup use ugettext_lazy, but now django v4 use only gettext_lazy. ugettext_lazy = gettext_lazy add venv\lib\python3.10\site-packages\django\utils\translation__init__.py line 112
Bug Report
Describe the bug
ImportError is raised when running
python manage.py dbbackup
from command lineTo Reproduce
pip install django-dbbackup
'dbbackup'
to INSTALLED_APPS list in settings.pypython manage.py dbbackup
from command lineExpected behavior
Backup file to be created at appointed folder
Screenshots or reproduction
Versions
Django-dbbackup
External tools
The text was updated successfully, but these errors were encountered: