You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have seen this before but cannot recall how it was "fixed". I may have something to do with markdown versions. I see that we have both markdown and markdown2 libraries and swear I removed one (but that could have been in a branch possibly where I was seeing this).
File "/usr/src/app/webtool/templates/result.html", line 7, in block 'body'
{% include "result-details.html" %}
File "/usr/src/app/webtool/templates/result-details.html", line 167, in top-level template code
{% include "processor-details.html" %}
File "/usr/src/app/webtool/templates/processor-details.html", line 73, in top-level template code
{% include "components/processor-option.html" %}
File "/usr/src/app/webtool/templates/components/processor-option.html", line 7, in top-level template code
{{ option_settings.help|markdown|safe }}
File "/usr/src/app/webtool/lib/template_filters.py", line 107, in _jinja2_filter_markdown
val = markdown.markdown(text)
File "/opt/venv/lib/python3.8/site-packages/markdown/core.py", line 391, in markdown
return md.convert(text)
File "/opt/venv/lib/python3.8/site-packages/markdown/core.py", line 252, in convert
if not source.strip():
jinja2.exceptions.UndefinedError: 'tuple object' has no attribute 'help'
Apparently it isn't the removal of |markdown|safe, but instead it is a possibly random error. Reloading the page can cause the issue to go away (or occur).
{% if option_settings is mapping %}
{{ option_settings.help|markdown|safe }}
{% endif %}
Don't know why it's happening, but this will stop it from happening...
Immediately before option_settings.help is called, option_settings.type is successful so I'm not convinced option_settings is in fact a tuple until markdown does something to it.
Describe the bug
I have seen this before but cannot recall how it was "fixed". I may have something to do with markdown versions. I see that we have both
markdown
andmarkdown2
libraries and swear I removed one (but that could have been in a branch possibly where I was seeing this).This line seems to be the culprit (or possibly a weird datasource option)
Changing it from
{{ option_settings.help|markdown|safe }}
to{{ option_settings.help }}
causes the problem to go away, but I'm not sure what is happening.The text was updated successfully, but these errors were encountered: