Exception while resolving variable 'q' in template 'home.html' #2149

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

Originally created by @erkib on GitHub (Nov 28, 2018).

Environment

  • Python version: 3.6
  • NetBox version: 2.5
  • OS: Centos 7

Exception

2018-11-28 07:49:48,108 DEBUG Exception while resolving variable 'q' in template 'home.html'.
Traceback (most recent call last):
File "/app/env/lib64/python3.6/site-packages/django/utils/datastructures.py", line 77, in getitem
list_ = super().getitem(key)
KeyError: 'q'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/app/env/lib64/python3.6/site-packages/django/template/base.py", line 829, in _resolve_lookup
current = current[bit]
File "/app/env/lib64/python3.6/site-packages/django/utils/datastructures.py", line 79, in getitem
raise MultiValueDictKeyError(key)
django.utils.datastructures.MultiValueDictKeyError: 'q'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/app/env/lib64/python3.6/site-packages/django/template/base.py", line 837, in _resolve_lookup
current = getattr(current, bit)
AttributeError: 'QueryDict' object has no attribute 'q'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/app/env/lib64/python3.6/site-packages/django/template/base.py", line 843, in _resolve_lookup
current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'q'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/app/env/lib64/python3.6/site-packages/django/template/base.py", line 850, in _resolve_lookup
(bit, current)) # missing attribute
django.template.base.VariableDoesNotExist: Failed lookup for key [q] in <QueryDict: {}>

Location

This comes actually from search_form.html template which is linked to all pages through navigation menu.

Originally created by @erkib on GitHub (Nov 28, 2018). ### Environment * Python version: 3.6 * NetBox version: 2.5 * OS: Centos 7 ### Exception 2018-11-28 07:49:48,108 DEBUG Exception while resolving variable 'q' in template 'home.html'. Traceback (most recent call last): File "/app/env/lib64/python3.6/site-packages/django/utils/datastructures.py", line 77, in __getitem__ list_ = super().__getitem__(key) KeyError: 'q' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/env/lib64/python3.6/site-packages/django/template/base.py", line 829, in _resolve_lookup current = current[bit] File "/app/env/lib64/python3.6/site-packages/django/utils/datastructures.py", line 79, in __getitem__ raise MultiValueDictKeyError(key) django.utils.datastructures.MultiValueDictKeyError: 'q' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/env/lib64/python3.6/site-packages/django/template/base.py", line 837, in _resolve_lookup current = getattr(current, bit) AttributeError: 'QueryDict' object has no attribute 'q' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/env/lib64/python3.6/site-packages/django/template/base.py", line 843, in _resolve_lookup current = current[int(bit)] ValueError: invalid literal for int() with base 10: 'q' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/env/lib64/python3.6/site-packages/django/template/base.py", line 850, in _resolve_lookup (bit, current)) # missing attribute django.template.base.VariableDoesNotExist: Failed lookup for key [q] in <QueryDict: {}> ### Location This comes actually from search_form.html template which is linked to all pages through navigation menu.
adam closed this issue 2025-12-29 17:22:42 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 28, 2018):

Thank you for your interest in NetBox. We require that all issues be submitted using one of the templates provided here. This is to ensure that only valid issues are reported and that each issue includes all the information necessary for a developer to act on it. Please update your issue so that it matches the appropriate template (this may require rewriting your issue entirely). This issue will be closed in one week if it has not been updated. Thanks!

@jeremystretch commented on GitHub (Nov 28, 2018): Thank you for your interest in NetBox. We require that all issues be submitted using one of the templates provided [here](https://github.com/digitalocean/netbox/issues/new/choose). This is to ensure that only valid issues are reported and that each issue includes all the information necessary for a developer to act on it. Please update your issue so that it matches the appropriate template (this may require rewriting your issue entirely). This issue will be closed in one week if it has not been updated. Thanks!
Author
Owner

@jeremystretch commented on GitHub (Dec 5, 2018):

Closing due to inactivity.

@jeremystretch commented on GitHub (Dec 5, 2018): Closing due to inactivity.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2149