Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception/tracebacks when loading frontend/index.html template #1088

Closed
ssciolla opened this issue Sep 11, 2020 · 3 comments · Fixed by #1287
Closed

Exception/tracebacks when loading frontend/index.html template #1088

ssciolla opened this issue Sep 11, 2020 · 3 comments · Fixed by #1287
Assignees
Labels
🪳 bug Something isn't working

Comments

@ssciolla
Copy link
Contributor

Thank you for contributing to this project!

  • Make sure to search the issues for duplicates first!

Expected behavior (A description of what you expected to happen) :

We shouldn't be regularly seeing exceptions and tracebacks in the logs.

Describe the bug (Tell us what happens instead of the expected behavior) :

There seems to be some exception and tracebacks logged at the DEBUG level when trying to load the frontend/index.html template.

[base.py:867] Exception while resolving variable 'content' in template 'frontend/index.html'.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 828, 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 "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 836, in _resolve_lookup
    current = getattr(current, bit)
AttributeError: 'NoneType' object has no attribute 'content'

During handling of the above exception, another exception occurred:

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

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/django/template/base.py", line 847, in _resolve_lookup
   raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key [content] in None

Steps to Reproduce :

  1. Monitor the logs when the application is initially loading in a browser.
@ssciolla ssciolla added the 🪳 bug Something isn't working label Sep 11, 2020
@project-bot project-bot bot added this to To do in MyLA-Default-Project Sep 11, 2020
@jennlove-um jennlove-um added this to To do in MyLA-2021.03.01 via automation Mar 11, 2021
@jennlove-um jennlove-um removed this from To do in MyLA-Default-Project Mar 11, 2021
@jennlove-um
Copy link
Contributor

Zhen will verify whether this is still an issue.

@jonespm jonespm assigned jonespm and unassigned zqian Jul 8, 2021
@jonespm
Copy link
Member

jonespm commented Jul 8, 2021

This is still an issue, this is just a problem locally when flatpages content isn't set

jonespm added a commit to jonespm/student-dashboard-django that referenced this issue Jul 8, 2021
@ssciolla ssciolla linked a pull request Jul 8, 2021 that will close this issue
MyLA-2021.03.01 automation moved this from To do to Review/QA Jul 8, 2021
@zqian zqian moved this from Review/QA to Review/QA - DEV in MyLA-2021.03.01 Jul 14, 2021
@jennlove-um jennlove-um removed this from Review/QA - DEV in MyLA-2021.03.01 Aug 12, 2021
@jennlove-um jennlove-um added this to To do in MyLA-2021.02.05 via automation Aug 12, 2021
@jonespm jonespm moved this from To do to Review/QA - DEV in MyLA-2021.02.05 Aug 12, 2021
@zqian
Copy link
Member

zqian commented Aug 13, 2021

Tested on MyLA test instance where debug mode is on:

  • Removed the content of /copyright/ flat page
  • checked the log file and found no occurrence of above stack trace.
  • Added the content back in /copyright/ flat page

@zqian zqian moved this from Review/QA - DEV to Done in MyLA-2021.02.05 Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants