[2.5] Start-up - KeyError: 'DEBUG'

Bug #1794972 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Blake Rouse

Bug Description

2018-09-28 02:12:52 django.template: [debug] Exception while resolving variable 'DEBUG' in template 'maasserver/index.html'.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/template/base.py", line 882, in _resolve_lookup
    current = current[bit]
  File "/usr/lib/python3/dist-packages/django/template/context.py", line 87, in __getitem__
    raise KeyError(key)
KeyError: 'DEBUG'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/template/base.py", line 888, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'RequestContext' has no attribute 'DEBUG'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/template/base.py", line 896, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'DEBUG'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/template/base.py", line 903, in _resolve_lookup
    (bit, current)) # missing attribute
django.template.base.VariableDoesNotExist: Failed lookup for key [DEBUG] in "[{'True': True, 'False': False, 'None': None}, {'csrf_token': <SimpleLazyObject: <function csrf.<locals>._get_val at 0x7f268404f400>>, 'user': <SimpleLazyObject: <User: admin>>, 'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x7f26844f3278>, 'LANGUAGES': [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')], 'LANGUAGE_CODE': 'en-us', 'LANGUAGE_BIDI': False, 'MEDIA_URL': '', 'request': <WSGIRequest: GET '/MAAS/'>, 'STATIC_URL': '/MAAS/static/', 'messages': <django.contrib.messages.storage.fallback.FallbackStorage object at 0x7f268451cdd8>, 'DEFAULT_MESSAGE_LEVELS': {'DEBUG': 10, 'INFO': 20, 'SUCCESS': 25, 'WARNING': 30, 'ERROR': 40}, 'global_options': {'site_name': 'autopkgtest', 'enable_analytics': True}, 'debug': 'true', 'version': '2.5.0~beta2 (7263-gab89451ec+ci-0ubuntu1)', 'files_version': '2.5.0~beta2(7263-gab89451ec+ci-0ubuntu1)', 'doc_version': '2.5', 'register_url': 'http://10.245.136.6:5240/MAAS', 'register_secret': '60cb83261940fc278af60b1c75554027', 'completed_intro': False, 'user_completed_intro': False, 'analytics_user_id': '8492abb6-88db-4e7d-b406-8eec63a4990c-user3', 'maas_uuid': '8492abb6-88db-4e7d-b406-8eec63a4990c'}, {}, {'view': <maasserver.views.index.IndexView object at 0x7f268421a048>}, {}]"

Full log in:
http://10.245.136.4:8080/job/maas-bionic-master-git/95/artifact/results/artifacts/maas-logs/var/log/maas/regiond.log

Tags: sts

Related branches

Changed in maas:
importance: Undecided → High
status: New → Triaged
milestone: none → 2.5.0beta2
description: updated
summary: - [2.5] KeyError: 'DEBUG'
+ [2.5] Start-up - KeyError: 'DEBUG'
Changed in maas:
status: Triaged → In Progress
assignee: nobody → Blake Rouse (blake-rouse)
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
Revision history for this message
Chris Johnston (cjohnston) wrote :

This can also be found in 2.4.2-7034-g2f5deb8b8-0ubuntu1

no longer affects: maas (Ubuntu)
Felipe Reyes (freyes)
tags: added: sts
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.