I tried to upgrade the database after updating docker containers, and got the errors pasted below instead of the usual successful update.
I'm using the latest inventree/inventree:stable docker image (sha256:19525ac2ccee0aa048f6b8cd717d2cc6e331e333cc1385a364eb453d84a74101
).
command: invoke update
Usually this performs the upgrade successfully, then I restart the proxy, server, and worker containers.
InvenTree Version [0.16.8](https://github.com/inventree/InvenTree/releases)Up to Date
InvenTree Documentation https://docs.inventree.org/en/0.16.8
API Version [232](https://inventree.go-robo.net/api-doc/)
Python Version 3.11.9
Django Version [4.2.15](https://www.djangoproject.com/)
View Code on GitHub https://github.com/InvenTree/InvenTree/
Credits https://docs.inventree.org/en/latest/credits/
Mobile App https://docs.inventree.org/app/
Submit Bug Report [https://github.com/InvenTree/InvenTree/issues](https://github.com/InvenTree/InvenTree//issues)
Python version 3.11.9 - /usr/local/bin/python3
/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
/usr/local/lib/python3.11/site-packages/allauth/exceptions.py:9: UserWarning: allauth.exceptions is deprecated, use allauth.core.exceptions
warnings.warn("allauth.exceptions is deprecated, use allauth.core.exceptions")
Backing up InvenTree database...
Python version 3.11.9 - /usr/local/bin/python3
/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
Traceback (most recent call last):
File "/home/inventree/src/backend/InvenTree/manage.py", line 24, in <module>
main()
File "/home/inventree/src/backend/InvenTree/manage.py", line 20, in main
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 275, in fetch_command
klass = load_command_class(app_name, subcommand)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 48, in load_command_class
module = import_module("%s.management.commands.%s" % (app_name, name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/root/.local/lib/python3.11/site-packages/dbbackup/management/commands/dbbackup.py", line 9, in <module>
from ...storage import StorageError, get_storage
File "/root/.local/lib/python3.11/site-packages/dbbackup/storage.py", line 7, in <module>
from django.core.files.storage import get_storage_class
ImportError: cannot import name 'get_storage_class' from 'django.core.files.storage' (/usr/local/lib/python3.11/site-packages/django/core/files/storage/__init__.py)w
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too