Closed ianchadd closed 1 year ago
Error in Debrief.html: The given variable ''guess_correct'' ('guess_correct') is neither a model field nor a form field.
2 {% load otree static %}
3
4 {% block title %}
5 Debrief Questionnaire
6 {% endblock %}
7
8 {% block content %}
9
10 Make a guess on how often the VA was correct within your trial. You will be paid ??? extra for the correctness of your answer. 11
12 {% formfield 'guess_correct' label="Guess" %} 13 {% next_button %} 14I can't reproduce this and it makes no sense for it to be happening. Are you sure you're running from BaselineEdits and completely up to date? We should talk about this tomorrow.
You changed the way guess_correct was implemented in Debrief.html, and this is now working as intended in oTree 2.5.8 (base req). Closing this issue to declutter.
Traceback:
`Environment:
Request Method: GET Request URL: http://localhost:8000/p/as0wdjog/pt1_VA2/Debrief/4/
Django Version: 2.2.4 Python Version: 3.7.6 Installed Applications: ['otree', 'django.contrib.auth', 'django.forms', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'channels', 'huey.contrib.djhuey', 'idmap', 'custom_templates', 'django.contrib.humanize', 'otreeutils', 'radiogrid', 'slider_puzzle', 'pt3', 'pt2grp', 'pt1_VA2', 'Introduction', 'survey_va_pilot', 'slider_individual', 'pt2', 'pt0', 'pt4', 'pt99', 'slider_training', 'pt1grp'] Installed Middleware: ['otree.middleware.CheckDBMiddleware', 'otree.middleware.perf_middleware', 'whitenoise.middleware.WhiteNoiseMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware']
Template error: In template /Users/chaddi/va/pt1_VA2/templates/pt1_VA2/Debrief.html, error at line 12 The given variable ''guess_correct'' ('guess_correct') is neither a model field nor a form field. 2 : {% load otree static %} 3 : 4 : {% block title %} 5 : Debrief Questionnaire 6 : {% endblock %} 7 : 8 : {% block content %} 9 :
10 : Make a guess on how often the VA was correct within your trial. You will be paid ??? extra for the correctness of your answer. 11 :
12 : {% formfield 'guess_correct' label="Guess" %} 13 : {% next_button %} 14 : 15 : {% endblock %} 16 :Traceback:
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/otree/views/abstract.py" in dispatch
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/response.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/response.py" in rendered_content
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/backends/django.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in _render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/otree/strict_templates.py" in render_annotated
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/loader_tags.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in _render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/otree/strict_templates.py" in render_annotated
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/loader_tags.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in _render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/otree/strict_templates.py" in render_annotated
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/loader_tags.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in _render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/otree/strict_templates.py" in render_annotated
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/loader_tags.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/otree/strict_templates.py" in render_annotated
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/loader_tags.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/template/base.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/otree/strict_templates.py" in render_annotated
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/otree/templatetags/otree_forms.py" in render
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/otree/templatetags/otree_forms.py" in get_tag_specific_context
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/otree/templatetags/otree_forms.py" in get_bound_field
Exception Type: ValueError at /p/as0wdjog/pt1_VA2/Debrief/4/ Exception Value: The given variable ''guess_correct'' ('guess_correct') is neither a model field nor a form field. `