krischer / jane

Jane - Document Database for Seismology
http://krischer.github.io/jane
GNU General Public License v3.0
27 stars 9 forks source link

Error in debug log when navigating to REST login page #42

Open megies opened 7 years ago

megies commented 7 years ago

When I navigate to the REST login page, I see the following error log in the debug output (logging in works, though):

Traceback (most recent call last):
  File "/home/megies/anaconda/envs/jane/lib/python3.4/site-packages/django/template/base.py", line 898, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'name'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/megies/anaconda/envs/jane/lib/python3.4/site-packages/django/template/base.py", line 905, in _resolve_lookup
    (bit, current))  # missing attribute
django.template.base.VariableDoesNotExist: Failed lookup for key [name] in '[{\'None\': None, \'True\': True, \'False\': False}, {\'request\': <WSGIRequest: GET \'/rest/api-auth/login/?next=/static/web_gis/index.html\'>, \'user\': <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f5900d6a0f0>>, \'debug\': True, \'DEFAULT_MESSAGE_LEVELS\': {\'INFO\': 20, \'ERROR\': 40, \'SUCCESS\': 25, \'DEBUG\': 10, \'WARNING\': 30}, \'STATIC_URL\': \'/static/\', \'perms\': <django.contrib.auth.context_processors.PermWrapper object at 0x7f5900d70da0>, \'sql_queries\': <function debug.<locals>.<lambda> at 0x7f5903ed3e18>, \'csrf_token\': <SimpleLazyObject: <function csrf.<locals>._get_val at 0x7f5901e09b70>>, \'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\'), (\'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\'), (\'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 Bokmal\'), (\'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_BIDI\': False, \'TIME_ZONE\': \'UTC\', \'MEDIA_URL\': \'/media/\', \'messages\': <django.contrib.messages.storage.fallback.FallbackStorage object at 0x7f5900d6a358>, \'LANGUAGE_CODE\': \'en-gb\'}, {}, {\'form\': <AuthenticationForm bound=False, valid=Unknown, fields=(username;password)>, \'site\': <django.contrib.sites.requests.RequestSite object at 0x7f5900d712b0>, \'site_name\': \'localhost:8000\', \'next\': \'/static/web_gis/index.html\'}, {\'block\': <Block Node: head. Contents: [<TextNode: \'\\n\\n    \'>, <Block Node: meta. Contents: [<TextNode: \'\\n      <meta http-equiv="\'>]>, <TextNode: \'\\n\\n    <title>\'>, <Block Node: title. Contents: [<IfNode>, <TextNode: \'Django REST framework\'>]>, <TextNode: \'</title>\\n\\n    \'>, <Block Node: style. Contents: [<TextNode: \'\\n      \'>, <Block Node: bootstrap_theme. Contents: [<TextNode: \'\\n        <link rel="style\'>, <django.contrib.staticfiles.templatetags.staticfiles.StaticFilesNode object at 0x7f5900d2a780>, <TextNode: \'"/>\\n        <link rel="st\'>, <django.contrib.staticfiles.templatetags.staticfiles.StaticFilesNode object at 0x7f5900d2a828>, <TextNode: \'"/>\\n      \'>]>, <TextNode: \'\\n\\n      <link rel="styles\'>, <django.contrib.staticfiles.templatetags.staticfiles.StaticFilesNode object at 0x7f5900d2a898>, <TextNode: \'"/>\\n      <link rel="styl\'>, <django.contrib.staticfiles.templatetags.staticfiles.StaticFilesNode object at 0x7f5900d2a940>, <TextNode: \'"/>\\n    \'>]>, <TextNode: \'\\n\\n  \'>]>}, {\'block\': <Block Node: title. Contents: [<IfNode>, <TextNode: \'Django REST framework\'>]>}]'
megies commented 7 years ago

Here's another one, appears when deleting documents through the admin interface:

DEBUG Exception while resolving variable 'is_multipart' in template 'admin/documents/document/change_list.html'.
Traceback (most recent call last):
  File "/home/megies/anaconda/envs/jane/lib/python3.4/site-packages/django/template/base.py", line 883, in _resolve_lookup
    current = current[bit]
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/megies/anaconda/envs/jane/lib/python3.4/site-packages/django/template/base.py", line 891, in _resolve_lookup
    current = getattr(current, bit)
AttributeError: 'NoneType' object has no attribute 'is_multipart'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/megies/anaconda/envs/jane/lib/python3.4/site-packages/django/template/base.py", line 898, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'is_multipart'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/megies/anaconda/envs/jane/lib/python3.4/site-packages/django/template/base.py", line 905, in _resolve_lookup
    (bit, current))  # missing attribute
django.template.base.VariableDoesNotExist: Failed lookup for key [is_multipart] in 'None'