Debug mode: error logs showing exceptions to resolve template variables #6427

Closed
opened 2025-12-29 19:40:36 +01:00 by adam · 1 comment
Owner

Originally created by @candlerb on GitHub (May 1, 2022).

NetBox version

v3.2.2

Python version

3.8

Steps to Reproduce

Set DEBUG = True in configuration.py, restart Netbox, and browse to home page.

Then click on the "Logging" section in the right-hand debug panel.

image

Expected Behavior

No errors to be seen

Observed Behavior

The following messages are logged. Note the various "Exception while resolving variable..." messages.

Level Time Channel Message Location
DEBUG 03:47:12 05/01/2022 netbox.config Loaded configuration data from cache /opt/netbox/netbox/netbox/config/__init__.py:73
DEBUG 03:47:12 05/01/2022 netbox.config Initialized configuration /opt/netbox/netbox/netbox/config/__init__.py:28
DEBUG 03:47:14 05/01/2022 django.template Exception while resolving variable 'q' in template 'home.html'. /opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922
DEBUG 03:47:14 05/01/2022 django.template Exception while resolving variable 'value' in template 'home.html'. /opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922
DEBUG 03:47:14 05/01/2022 django.template Exception while resolving variable 'q' in template 'home.html'. /opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922
DEBUG 03:47:14 05/01/2022 django.template Exception while resolving variable 'value' in template 'home.html'. /opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922
DEBUG 03:47:14 05/01/2022 django.template Exception while resolving variable 'page' in template 'inc/table.html'. /opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922
DEBUG 03:47:16 05/01/2022 django.template Exception while resolving variable 'form' in template 'home.html'. /opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922
DEBUG 03:47:16 05/01/2022 django.template Exception while resolving variable 'form' in template 'home.html'. /opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922
DEBUG 03:47:16 05/01/2022 netbox.config Cleared configuration /opt/netbox/netbox/netbox/config/__init__.py:38

If these errors are expected and normal, then it's confusing when debugging other problems. (In my case I was trying to debug an authentication issue)

Originally created by @candlerb on GitHub (May 1, 2022). ### NetBox version v3.2.2 ### Python version 3.8 ### Steps to Reproduce Set `DEBUG = True` in configuration.py, restart Netbox, and browse to home page. Then click on the "Logging" section in the right-hand debug panel. ![image](https://user-images.githubusercontent.com/44789/166153741-a8f49b73-8665-4f93-bb73-f376859929de.png) ### Expected Behavior No errors to be seen ### Observed Behavior The following messages are logged. Note the various "Exception while resolving variable..." messages. Level | Time | Channel | Message | Location -- | -- | -- | -- | -- DEBUG | 03:47:12 05/01/2022 | netbox.config | Loaded configuration data from cache | `/opt/netbox/netbox/netbox/config/__init__.py:73` DEBUG | 03:47:12 05/01/2022 | netbox.config | Initialized configuration | `/opt/netbox/netbox/netbox/config/__init__.py:28` DEBUG | 03:47:14 05/01/2022 | django.template | Exception while resolving variable 'q' in template 'home.html'. | `/opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922` DEBUG | 03:47:14 05/01/2022 | django.template | Exception while resolving variable 'value' in template 'home.html'. | `/opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922` DEBUG | 03:47:14 05/01/2022 | django.template | Exception while resolving variable 'q' in template 'home.html'. | `/opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922` DEBUG | 03:47:14 05/01/2022 | django.template | Exception while resolving variable 'value' in template 'home.html'. | `/opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922` DEBUG | 03:47:14 05/01/2022 | django.template | Exception while resolving variable 'page' in template 'inc/table.html'. | `/opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922` DEBUG | 03:47:16 05/01/2022 | django.template | Exception while resolving variable 'form' in template 'home.html'. | `/opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922` DEBUG | 03:47:16 05/01/2022 | django.template | Exception while resolving variable 'form' in template 'home.html'. | `/opt/netbox/venv/lib/python3.8/site-packages/django/template/base.py:922` DEBUG | 03:47:16 05/01/2022 | netbox.config | Cleared configuration | `/opt/netbox/netbox/netbox/config/__init__.py:38` If these errors are expected and normal, then it's confusing when debugging other problems. (In my case I was trying to debug an authentication issue)
adam added the type: bug label 2025-12-29 19:40:36 +01:00
adam closed this issue 2025-12-29 19:40:36 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (May 1, 2022):

Duplicate of #7997

@kkthxbye-code commented on GitHub (May 1, 2022): Duplicate of #7997
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6427