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

Bug #1794971 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 01:40:50 regiond: [info] 10.245.136.6 GET /MAAS HTTP/1.1 --> 302 FOUND (referrer: -; agent: Python-urllib/3.6)
2018-09-28 01:40:50 django.template: [debug] Exception while resolving variable 'css_class' in template 'registration/login.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: 'css_class'

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 'css_class'

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: 'css_class'

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 [css_class] in '[{\'True\': True, \'False\': False, \'None\': None}, {\'csrf_token\': <SimpleLazyObject: \'A7u24hHElIyXNEfWqVMoOOlYp4vEJLp2Y6fXSv2HLxUyjB0atyaJJJdoYwGuBkJF\'>, \'user\': <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f2684552cc0>>, \'perms\': <django.contrib.auth.context_processors.PermWrapper object at 0x7f268451c668>, \'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/accounts/login/?next=%2FMAAS%2F\'>, \'STATIC_URL\': \'/MAAS/static/\', \'messages\': <django.contrib.messages.storage.fallback.FallbackStorage object at 0x7f26845e4f98>, \'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-anon\', \'maas_uuid\': \'8492abb6-88db-4e7d-b406-8eec63a4990c\'}, {}, {\'form\': <AuthenticationForm bound=False, valid=Unknown, fields=(username;password)>, \'view\': <django.contrib.auth.views.LoginView object at 0x7f26845524a8>, \'next\': \'/MAAS/\', \'site\': <Site: example.com>, \'site_name\': \'example.com\', \'no_users\': False, \'create_command\': \'sudo maas\', \'external_auth_url\': \'\'}, {\'block\': <Block Node: content. Contents: [<TextNode: \'\\n \'>, <Block Node: page-title-block. Contents: [<TextNode: \'\\n \'>]>, <TextNode: \'\\n <div class="p-strip"\'>, <IfNode>, <TextNode: \'\\n </div>\\n </div\'>]>}, {\'forloop\': {\'parentloop\': {}, \'counter0\': 0, \'counter\': 1, \'revcounter\': 2, \'revcounter0\': 1, \'first\': True, \'last\': False}, \'field\': <django.forms.boundfield.BoundField object at 0x7f26844c55f8>}, {}]'
2018-09-28 01:40:50 django.template: [debug] Exception while resolving variable 'css_class' in template 'registration/login.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: 'css_class'

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 'css_class'

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: 'css_class'

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

Related branches

Changed in maas:
importance: Undecided → High
status: New → Triaged
milestone: none → 2.5.0beta2
description: updated
summary: - [2.5] KeyError: 'css_class'
+ [2.5] Start-up - KeyError: 'css_class'
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
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.