Issues upgrading to 4.1.1 #10254

Closed
opened 2025-12-29 21:28:59 +01:00 by adam · 2 comments
Owner

Originally created by @deanfourie1 on GitHub (Sep 16, 2024).

Deployment Type

Self-hosted

NetBox Version

v4.1.1

Python Version

3.11

Steps to Reproduce

Attempt upgrade using ./upgrade.sh.

Expected Behavior

Upgrade to 4.1.1

Observed Behavior

Receive the following error on migrations.

Installing collected packages: text-unidecode, sgmllib3k, paginate, nh3, aniso8601, watchdog, urllib3, uritemplate, tzdata, typing-extensions, tablib, svgwrite, sqlparse, six, rpds-py, regex, PyYAML, pytkdocs, PyJWT, pygments, pycparser, psycopg-c, prometheus-client, platformdirs, Pillow, pathspec, packaging, oauthlib, netaddr, mkdocs-material-extensions, mergedeep, mdurl, MarkupSafe, Markdown, inflection, idna, graphql-core, feedparser, defusedxml, colorama, click, charset-normalizer, certifi, babel, attrs, async-timeout, asgiref, requests, referencing, redis, pyyaml-env-tag, python3-openid, python-dateutil, pymdown-extensions, psycopg-pool, psycopg, promise, mkdocs-get-deps, markdown-it-py, Jinja2, gunicorn, graphql-relay, django-prometheus, django-pglocks, Django, cffi, strawberry-graphql, rq, rich, requests-oauthlib, jsonschema-specifications, graphene, ghp-import, drf-spectacular-sidecar, djangorestframework, django-timezone-field, django-taggit, django-tables2, django-redis, django-js-asset, django-htmx, django-filter, django-debug-toolbar, django-cors-headers, cryptography, strawberry-graphql-django, social-auth-core, mkdocs, jsonschema, graphene-django, django-rq, django-rich, django-mptt, social-auth-app-django, mkdocs-material, mkdocs-autorefs, drf-spectacular, django-graphiql-debug-toolbar, mkdocstrings, mkdocstrings-python-legacy
Successfully installed Django-5.0.9 Jinja2-3.1.4 Markdown-3.7 MarkupSafe-2.1.5 Pillow-10.4.0 PyJWT-2.9.0 PyYAML-6.0.2 aniso8601-9.0.1 asgiref-3.8.1 async-timeout-4.0.3 attrs-24.2.0 babel-2.16.0 certifi-2024.8.30 cffi-1.17.1 charset-normalizer-3.3.2 click-8.1.7 colorama-0.4.6 cryptography-43.0.1 defusedxml-0.8.0rc2 django-cors-headers-4.4.0 django-debug-toolbar-4.4.6 django-filter-24.3 django-graphiql-debug-toolbar-0.2.0 django-htmx-1.19.0 django-js-asset-2.2.0 django-mptt-0.16.0 django-pglocks-1.0.4 django-prometheus-2.3.1 django-redis-5.4.0 django-rich-1.11.0 django-rq-2.10.2 django-tables2-2.7.0 django-taggit-6.0.0 django-timezone-field-7.0 djangorestframework-3.15.2 drf-spectacular-0.27.2 drf-spectacular-sidecar-2024.7.1 feedparser-6.0.11 ghp-import-2.1.0 graphene-3.3 graphene-django-3.2.2 graphql-core-3.2.4 graphql-relay-3.2.0 gunicorn-23.0.0 idna-3.10 inflection-0.5.1 jsonschema-4.23.0 jsonschema-specifications-2023.12.1 markdown-it-py-3.0.0 mdurl-0.1.2 mergedeep-1.3.4 mkdocs-1.6.1 mkdocs-autorefs-1.2.0 mkdocs-get-deps-0.2.0 mkdocs-material-9.5.34 mkdocs-material-extensions-1.3.1 mkdocstrings-0.26.1 mkdocstrings-python-legacy-0.2.4 netaddr-1.3.0 nh3-0.2.18 oauthlib-3.2.2 packaging-24.1 paginate-0.5.7 pathspec-0.12.1 platformdirs-4.3.3 prometheus-client-0.20.0 promise-2.3 psycopg-3.2.1 psycopg-c-3.2.1 psycopg-pool-3.2.3 pycparser-2.22 pygments-2.18.0 pymdown-extensions-10.9 python-dateutil-2.9.0.post0 python3-openid-3.2.0 pytkdocs-0.16.2 pyyaml-env-tag-0.1 redis-5.0.8 referencing-0.35.1 regex-2024.9.11 requests-2.32.3 requests-oauthlib-2.0.0 rich-13.8.1 rpds-py-0.20.0 rq-1.16.2 sgmllib3k-1.0.0 six-1.16.0 social-auth-app-django-5.4.2 social-auth-core-4.5.4 sqlparse-0.5.1 strawberry-graphql-0.240.2 strawberry-graphql-django-0.47.2 svgwrite-1.4.3 tablib-3.6.1 text-unidecode-1.3 typing-extensions-4.12.2 tzdata-2024.1 uritemplate-4.1.1 urllib3-2.2.3 watchdog-5.0.2
Installing local dependencies (pip install -r local_requirements.txt)...
Applying database migrations (python3 netbox/manage.py migrate)...
Traceback (most recent call last):
  File "/opt/netbox/netbox/netbox/settings.py", line 801, in <module>
    plugin = importlib.import_module(plugin_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1142, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'netbox_attachments'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/netbox/netbox/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/base.py", line 413, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/base.py", line 459, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/base.py", line 104, in wrapper
    saved_locale = translation.get_language()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.11/site-packages/django/utils/translation/__init__.py", line 211, in get_language
    return _trans.get_language()
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.11/site-packages/django/utils/translation/__init__.py", line 66, in __getattr__
    if settings.USE_I18N:
       ^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.11/site-packages/django/conf/__init__.py", line 89, in __getattr__
    self._setup(name)
  File "/opt/netbox/venv/lib/python3.11/site-packages/django/conf/__init__.py", line 76, in _setup
    self._wrapped = Settings(settings_module)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.11/site-packages/django/conf/__init__.py", line 190, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, 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 "/opt/netbox/netbox/netbox/settings.py", line 804, in <module>
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Unable to import plugin netbox_attachments: Module not found. Check that the plugin module has been installed within the correct Python environment.
root@netbox-local:/opt/netbox# 
Originally created by @deanfourie1 on GitHub (Sep 16, 2024). ### Deployment Type Self-hosted ### NetBox Version v4.1.1 ### Python Version 3.11 ### Steps to Reproduce Attempt upgrade using ./upgrade.sh. ### Expected Behavior Upgrade to 4.1.1 ### Observed Behavior Receive the following error on migrations. ``` Installing collected packages: text-unidecode, sgmllib3k, paginate, nh3, aniso8601, watchdog, urllib3, uritemplate, tzdata, typing-extensions, tablib, svgwrite, sqlparse, six, rpds-py, regex, PyYAML, pytkdocs, PyJWT, pygments, pycparser, psycopg-c, prometheus-client, platformdirs, Pillow, pathspec, packaging, oauthlib, netaddr, mkdocs-material-extensions, mergedeep, mdurl, MarkupSafe, Markdown, inflection, idna, graphql-core, feedparser, defusedxml, colorama, click, charset-normalizer, certifi, babel, attrs, async-timeout, asgiref, requests, referencing, redis, pyyaml-env-tag, python3-openid, python-dateutil, pymdown-extensions, psycopg-pool, psycopg, promise, mkdocs-get-deps, markdown-it-py, Jinja2, gunicorn, graphql-relay, django-prometheus, django-pglocks, Django, cffi, strawberry-graphql, rq, rich, requests-oauthlib, jsonschema-specifications, graphene, ghp-import, drf-spectacular-sidecar, djangorestframework, django-timezone-field, django-taggit, django-tables2, django-redis, django-js-asset, django-htmx, django-filter, django-debug-toolbar, django-cors-headers, cryptography, strawberry-graphql-django, social-auth-core, mkdocs, jsonschema, graphene-django, django-rq, django-rich, django-mptt, social-auth-app-django, mkdocs-material, mkdocs-autorefs, drf-spectacular, django-graphiql-debug-toolbar, mkdocstrings, mkdocstrings-python-legacy Successfully installed Django-5.0.9 Jinja2-3.1.4 Markdown-3.7 MarkupSafe-2.1.5 Pillow-10.4.0 PyJWT-2.9.0 PyYAML-6.0.2 aniso8601-9.0.1 asgiref-3.8.1 async-timeout-4.0.3 attrs-24.2.0 babel-2.16.0 certifi-2024.8.30 cffi-1.17.1 charset-normalizer-3.3.2 click-8.1.7 colorama-0.4.6 cryptography-43.0.1 defusedxml-0.8.0rc2 django-cors-headers-4.4.0 django-debug-toolbar-4.4.6 django-filter-24.3 django-graphiql-debug-toolbar-0.2.0 django-htmx-1.19.0 django-js-asset-2.2.0 django-mptt-0.16.0 django-pglocks-1.0.4 django-prometheus-2.3.1 django-redis-5.4.0 django-rich-1.11.0 django-rq-2.10.2 django-tables2-2.7.0 django-taggit-6.0.0 django-timezone-field-7.0 djangorestframework-3.15.2 drf-spectacular-0.27.2 drf-spectacular-sidecar-2024.7.1 feedparser-6.0.11 ghp-import-2.1.0 graphene-3.3 graphene-django-3.2.2 graphql-core-3.2.4 graphql-relay-3.2.0 gunicorn-23.0.0 idna-3.10 inflection-0.5.1 jsonschema-4.23.0 jsonschema-specifications-2023.12.1 markdown-it-py-3.0.0 mdurl-0.1.2 mergedeep-1.3.4 mkdocs-1.6.1 mkdocs-autorefs-1.2.0 mkdocs-get-deps-0.2.0 mkdocs-material-9.5.34 mkdocs-material-extensions-1.3.1 mkdocstrings-0.26.1 mkdocstrings-python-legacy-0.2.4 netaddr-1.3.0 nh3-0.2.18 oauthlib-3.2.2 packaging-24.1 paginate-0.5.7 pathspec-0.12.1 platformdirs-4.3.3 prometheus-client-0.20.0 promise-2.3 psycopg-3.2.1 psycopg-c-3.2.1 psycopg-pool-3.2.3 pycparser-2.22 pygments-2.18.0 pymdown-extensions-10.9 python-dateutil-2.9.0.post0 python3-openid-3.2.0 pytkdocs-0.16.2 pyyaml-env-tag-0.1 redis-5.0.8 referencing-0.35.1 regex-2024.9.11 requests-2.32.3 requests-oauthlib-2.0.0 rich-13.8.1 rpds-py-0.20.0 rq-1.16.2 sgmllib3k-1.0.0 six-1.16.0 social-auth-app-django-5.4.2 social-auth-core-4.5.4 sqlparse-0.5.1 strawberry-graphql-0.240.2 strawberry-graphql-django-0.47.2 svgwrite-1.4.3 tablib-3.6.1 text-unidecode-1.3 typing-extensions-4.12.2 tzdata-2024.1 uritemplate-4.1.1 urllib3-2.2.3 watchdog-5.0.2 Installing local dependencies (pip install -r local_requirements.txt)... Applying database migrations (python3 netbox/manage.py migrate)... Traceback (most recent call last): File "/opt/netbox/netbox/netbox/settings.py", line 801, in <module> plugin = importlib.import_module(plugin_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1206, in _gcd_import File "<frozen importlib._bootstrap>", line 1178, in _find_and_load File "<frozen importlib._bootstrap>", line 1142, in _find_and_load_unlocked ModuleNotFoundError: No module named 'netbox_attachments' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/netbox/netbox/manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/base.py", line 413, in run_from_argv self.execute(*args, **cmd_options) File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/base.py", line 459, in execute output = self.handle(*args, **options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/base.py", line 104, in wrapper saved_locale = translation.get_language() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/venv/lib/python3.11/site-packages/django/utils/translation/__init__.py", line 211, in get_language return _trans.get_language() ^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/venv/lib/python3.11/site-packages/django/utils/translation/__init__.py", line 66, in __getattr__ if settings.USE_I18N: ^^^^^^^^^^^^^^^^^ File "/opt/netbox/venv/lib/python3.11/site-packages/django/conf/__init__.py", line 89, in __getattr__ self._setup(name) File "/opt/netbox/venv/lib/python3.11/site-packages/django/conf/__init__.py", line 76, in _setup self._wrapped = Settings(settings_module) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/venv/lib/python3.11/site-packages/django/conf/__init__.py", line 190, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1206, in _gcd_import File "<frozen importlib._bootstrap>", line 1178, in _find_and_load File "<frozen importlib._bootstrap>", line 1149, 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 "/opt/netbox/netbox/netbox/settings.py", line 804, in <module> raise ImproperlyConfigured( django.core.exceptions.ImproperlyConfigured: Unable to import plugin netbox_attachments: Module not found. Check that the plugin module has been installed within the correct Python environment. root@netbox-local:/opt/netbox# ```
adam closed this issue 2025-12-29 21:28:59 +01:00
Author
Owner

@julianstolp commented on GitHub (Sep 16, 2024):

You need to follow the exception text. Add netbox-attachments to local_requirements.txt and try again.

@julianstolp commented on GitHub (Sep 16, 2024): You need to follow the exception text. Add `netbox-attachments` to local_requirements.txt and try again.
Author
Owner

@jeremystretch commented on GitHub (Sep 16, 2024):

As a reminder, please do not submit bug reports for help with upgrading NetBox.

@jeremystretch commented on GitHub (Sep 16, 2024): As a reminder, please do not submit bug reports for help with upgrading NetBox.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10254