manage.py migrate error #2078

Closed
opened 2025-12-29 17:22:04 +01:00 by adam · 5 comments
Owner

Originally created by @ghost on GitHub (Oct 29, 2018).

Environment

Debian 9.5 Stretch
Python version: 3.5
NetBox version: Newest from git v2.4.6

Steps to Reproduce
Went through the installation Guide on https://netbox.readthedocs.io/en/stable/installation/2-netbox/#installation

when executing sudo python3 manage.py migrate i get following error

Observed Behavior

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 365, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 216, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 36, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 673, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/migrate.py", line 12, in <module>
    from django.db.migrations.autodetector import MigrationAutodetector
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/autodetector.py", line 11, in <module>
    from django.db.migrations.questioner import MigrationQuestioner
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/questioner.py", line 9, in <module>
    from .loader import MigrationLoader
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/loader.py", line 8, in <module>
    from django.db.migrations.recorder import MigrationRecorder
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/recorder.py", line 9, in <module>
    class MigrationRecorder:
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/recorder.py", line 22, in MigrationRecorder
    class Migration(models.Model):
  File "/usr/local/lib/python3.5/dist-packages/django/db/models/base.py", line 100, in __new__
    app_config = apps.get_containing_app_config(module)
  File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 244, in get_containing_app_config
    self.check_apps_ready()
  File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 127, in check_apps_ready
    raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
Originally created by @ghost on GitHub (Oct 29, 2018). Environment Debian 9.5 Stretch **Python version:** 3.5 **NetBox version**: Newest from git v2.4.6 Steps to Reproduce Went through the installation Guide on https://netbox.readthedocs.io/en/stable/installation/2-netbox/#installation when executing` sudo python3 manage.py migrate` i get following error Observed Behavior ``` Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 371, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 365, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 216, in fetch_command klass = load_command_class(app_name, subcommand) File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 36, in load_command_class module = import_module('%s.management.commands.%s' % (app_name, name)) File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 986, in _gcd_import File "<frozen importlib._bootstrap>", line 969, in _find_and_load File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 673, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 673, in exec_module File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/migrate.py", line 12, in <module> from django.db.migrations.autodetector import MigrationAutodetector File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/autodetector.py", line 11, in <module> from django.db.migrations.questioner import MigrationQuestioner File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/questioner.py", line 9, in <module> from .loader import MigrationLoader File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/loader.py", line 8, in <module> from django.db.migrations.recorder import MigrationRecorder File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/recorder.py", line 9, in <module> class MigrationRecorder: File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/recorder.py", line 22, in MigrationRecorder class Migration(models.Model): File "/usr/local/lib/python3.5/dist-packages/django/db/models/base.py", line 100, in __new__ app_config = apps.get_containing_app_config(module) File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 244, in get_containing_app_config self.check_apps_ready() File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 127, in check_apps_ready raise AppRegistryNotReady("Apps aren't loaded yet.") django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. ```
adam closed this issue 2025-12-29 17:22:04 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 29, 2018):

Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using the template provided here. For general discussion, questions, or assistance with installation issues, please post to our mailing list.

@jeremystretch commented on GitHub (Oct 29, 2018): Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using the template provided [here](https://raw.githubusercontent.com/digitalocean/netbox/develop/.github/ISSUE_TEMPLATE.md). For general discussion, questions, or assistance with installation issues, please post to our [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss).
Author
Owner

@FitzChevalerie-22 commented on GitHub (Oct 31, 2018):

Hi,
I have the same problem at the same time with the same message.
Furthermore , the link for the support template is dead.

/opt/netbox/netbox$ sudo python3 manage.py migrate Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 371, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 365, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 216, in fetch_command klass = load_command_class(app_name, subcommand) File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 36, in load_command_class module = import_module('%s.management.commands.%s' % (app_name, name)) File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 986, in _gcd_import File "<frozen importlib._bootstrap>", line 969, in _find_and_load File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 673, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 665, in exec_module File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/migrate.py", line 12, in <module> from django.db.migrations.autodetector import MigrationAutodetector File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/autodetector.py", line 11, in <module> from django.db.migrations.questioner import MigrationQuestioner File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/questioner.py", line 9, in <module> from .loader import MigrationLoader File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/loader.py", line 8, in <module> from django.db.migrations.recorder import MigrationRecorder File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/recorder.py", line 9, in <module> class MigrationRecorder: File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/recorder.py", line 22, in MigrationRecorder class Migration(models.Model): File "/usr/local/lib/python3.5/dist-packages/django/db/models/base.py", line 100, in __new__ app_config = apps.get_containing_app_config(module) File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 244, in get_containing_app_config self.check_apps_ready() File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 127, in check_apps_ready raise AppRegistryNotReady("Apps aren't loaded yet.") django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.

Thanks for help

@FitzChevalerie-22 commented on GitHub (Oct 31, 2018): Hi, I have the same problem at the same time with the same message. Furthermore , the link for the support template is dead. `/opt/netbox/netbox$ sudo python3 manage.py migrate Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 371, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 365, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 216, in fetch_command klass = load_command_class(app_name, subcommand) File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 36, in load_command_class module = import_module('%s.management.commands.%s' % (app_name, name)) File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 986, in _gcd_import File "<frozen importlib._bootstrap>", line 969, in _find_and_load File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 673, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 665, in exec_module File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/migrate.py", line 12, in <module> from django.db.migrations.autodetector import MigrationAutodetector File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/autodetector.py", line 11, in <module> from django.db.migrations.questioner import MigrationQuestioner File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/questioner.py", line 9, in <module> from .loader import MigrationLoader File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/loader.py", line 8, in <module> from django.db.migrations.recorder import MigrationRecorder File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/recorder.py", line 9, in <module> class MigrationRecorder: File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/recorder.py", line 22, in MigrationRecorder class Migration(models.Model): File "/usr/local/lib/python3.5/dist-packages/django/db/models/base.py", line 100, in __new__ app_config = apps.get_containing_app_config(module) File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 244, in get_containing_app_config self.check_apps_ready() File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 127, in check_apps_ready raise AppRegistryNotReady("Apps aren't loaded yet.") django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. ` Thanks for help
Author
Owner

@lampwins commented on GitHub (Oct 31, 2018):

Make sure you have set up your configuration.py correctly per the docs. Otherwise, you may seek install help in the mailing list.

@lampwins commented on GitHub (Oct 31, 2018): Make sure you have set up your `configuration.py` correctly per the docs. Otherwise, you may seek install help in the mailing list.
Author
Owner

@FitzChevalerie-22 commented on GitHub (Oct 31, 2018):

Thx for your replie.
Where is the configuration.py?

@FitzChevalerie-22 commented on GitHub (Oct 31, 2018): Thx for your replie. Where is the configuration.py?
Author
Owner

@ghost commented on GitHub (Oct 31, 2018):

netbox/netbox/

@ghost commented on GitHub (Oct 31, 2018): netbox/netbox/
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2078