Upgrade from 2.8 to 2.9.3

312 views
Skip to first unread message

markus...@gmail.com

unread,
Sep 7, 2020, 3:52:36 PM9/7/20
to NetBox

There was a problem with your request. Please contact an administrator.

The complete exception is provided below:

<class 'django.contrib.contenttypes.models.ContentType.DoesNotExist'>
ContentType matching query does not exist. Python version: 3.6.9 NetBox version: 2.9.3

Got this.. any help?

naseef...@gmail.com

unread,
Sep 14, 2020, 10:19:31 AM9/14/20
to NetBox
Hi,
i've the same issue here 

naseef...@gmail.com

unread,
Sep 15, 2020, 4:03:30 AM9/15/20
to NetBox
i noticed its related to redis service

Brian Candler

unread,
Sep 15, 2020, 4:37:45 AM9/15/20
to NetBox
In what way is it related to the redis service?  What exactly did you see that draws you to that conclusion?

Jeremy Rambo

unread,
Sep 16, 2020, 11:33:18 AM9/16/20
to NetBox
I am getting this same issue and it is happening after I have tried to replicate my netbox database to a different instance.


Source Netbox version: 2.8.7
Destination Netbox version: 2.9.3

I'll keep digging into this on my end and let you know if I discover a fix.
Message has been deleted

Rob Duffy

unread,
Sep 17, 2020, 2:01:54 PM9/17/20
to Corey B, NetBox
Make sure the Redis configuration exists and is correct in configuration.py


REDIS = { 'tasks': { 'HOST': 'redis.example.com', 'PORT': 1234, 'PASSWORD': 'foobar', 'DATABASE': 0, 'DEFAULT_TIMEOUT': 300, 'SSL': False, }, 'caching': { 'HOST': 'localhost', 'PORT': 6379, 'PASSWORD': '', 'DATABASE': 1, 'DEFAULT_TIMEOUT': 300, 'SSL': False, } }

On Thu, 17 Sep 2020 at 18:57, Corey B <coreyp...@gmail.com> wrote:
This is what I'm seeing after using git to update from 2.8.6 to 2.9.3.


Traceback (most recent call last):
  File "netbox/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/opt/netbox/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/netbox/venv/lib/python3.6/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/netbox/venv/lib/python3.6/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/opt/netbox/venv/lib/python3.6/site-packages/django/core/management/base.py", line 82, in wrapped
    saved_locale = translation.get_language()
  File "/opt/netbox/venv/lib/python3.6/site-packages/django/utils/translation/__init__.py", line 252, in get_language
    return _trans.get_language()
  File "/opt/netbox/venv/lib/python3.6/site-packages/django/utils/translation/__init__.py", line 57, in __getattr__
    if settings.USE_I18N:
  File "/opt/netbox/venv/lib/python3.6/site-packages/django/conf/__init__.py", line 83, in __getattr__
    self._setup(name)
  File "/opt/netbox/venv/lib/python3.6/site-packages/django/conf/__init__.py", line 70, in _setup
    self._wrapped = Settings(settings_module)
  File "/opt/netbox/venv/lib/python3.6/site-packages/django/conf/__init__.py", line 177, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/netbox/netbox/netbox/settings.py", line 212, in <module>
    "REDIS section in configuration.py is missing the 'tasks' subsection."
django.core.exceptions.ImproperlyConfigured: REDIS section in configuration.py is missing the 'tasks' subsection.












On Tuesday, September 15, 2020 at 4:37:45 AM UTC-4 Brian Candler wrote:
In what way is it related to the redis service?  What exactly did you see that draws you to that conclusion?

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/dcc4997f-6361-4bdd-9f98-24dd26d61f8an%40googlegroups.com.
Message has been deleted
Message has been deleted
Message has been deleted

Rob Duffy

unread,
Sep 17, 2020, 5:37:14 PM9/17/20
to Corey B, NetBox
Corey,

You'll need to run it from the virtual environment.  Is that being done?

On Thu, 17 Sep 2020 at 21:31, Corey B <coreyp...@gmail.com> wrote:
Here's a bit more information after running python3 /opt/netbox/netbox/manage.py runserver 0.0.0.0:8000 --insecure


Performing system checks...

Exception in thread django-main-thread:
Traceback (most recent call last):
  File "/home/clairadmin/.local/lib/python3.6/site-packages/django/template/utils.py", line 66, in __getitem__
    return self._engines[alias]
KeyError: 'django'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/clairadmin/.local/lib/python3.6/site-packages/django/template/backends/django.py", line 121, in get_package_libraries
    module = import_module(entry[1])
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/clairadmin/.local/lib/python3.6/site-packages/django/contrib/admin/templatetags/admin_static.py", line 5, in <module>
    from django.utils.deprecation import RemovedInDjango30Warning
ImportError: cannot import name 'RemovedInDjango30Warning'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/admin/.local/lib/python3.6/site-packages/django/utils/autoreload.py", line 53, in wrapper
    fn(*args, **kwargs)
  File "/home/admin/.local/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 118, in inner_run
    self.check(display_num_errors=True)
  File "/home/admin/.local/lib/python3.6/site-packages/django/core/management/base.py", line 396, in check
    databases=databases,
  File "/home/admin/.local/lib/python3.6/site-packages/django/core/checks/registry.py", line 70, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "/home/admin/.local/lib/python3.6/site-packages/django/contrib/admin/checks.py", line 78, in check_dependencies
    for engine in engines.all():
  File "/home/admin/.local/lib/python3.6/site-packages/django/template/utils.py", line 90, in all
    return [self[alias] for alias in self]
  File "/home/admin/.local/lib/python3.6/site-packages/django/template/utils.py", line 90, in <listcomp>
    return [self[alias] for alias in self]
  File "/home/admin/.local/lib/python3.6/site-packages/django/template/utils.py", line 81, in __getitem__
    engine = engine_cls(params)
  File "/home/admin/.local/lib/python3.6/site-packages/django/template/backends/django.py", line 25, in __init__
    options['libraries'] = self.get_templatetag_libraries(libraries)
  File "/home/admin/.local/lib/python3.6/site-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries
    libraries = get_installed_libraries()
  File "/home/admin/.local/lib/python3.6/site-packages/django/template/backends/django.py", line 108, in get_installed_libraries
    for name in get_package_libraries(pkg):
  File "/home/admin/.local/lib/python3.6/site-packages/django/template/backends/django.py", line 125, in get_package_libraries
    "trying to load '%s': %s" % (entry[1], e)
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'django.contrib.admin.templatetags.admin_static': cannot import name 'RemovedInDjango30Warning'


On Thursday, September 17, 2020 at 2:12:14 PM UTC-4 Corey B wrote:
Thanks for that.  Sorry for deleting my original comment, I figured it out but you were quick with the reply!

Anyhow, after fixing that I'm now getting the error as others here:


<class 'django.contrib.contenttypes.models.ContentType.DoesNotExist'>
ContentType matching query does not exist.

 Python version: 3.6.9
NetBox version: 2.9.3  

Reply all
Reply to author
Forward
0 new messages