New bug: jinja2.exceptions.UndefinedError: 'reply' is undefined
cardoso-neto opened this issue · 0 comments
cardoso-neto commented
Found it when downloading this thread:
boards.4chan.org/pol/thread/293116201/
with:
python archiver.py https://boards.4chan.org/pol/thread/293116201/ --preserve_files
I don't know how front-ends work, but it looks like a missing flag? I don't know how to debug this.
I've been dealing with every bug I've found, but I need help on this one.
Traceback (most recent call last):
File "archiver.py", line 137, in <module>
main()
File "archiver.py", line 132, in main
feeder(url)
File "archiver.py", line 114, in feeder
archive(url)
File "archiver.py", line 86, in archive
extractor.extract(thread, params)
File "./archive-chan/extractors/fourchan_api.py", line 18, in extract
self.get_data(thread, params)
File "./archive-chan/extractors/fourchan_api.py", line 39, in get_data
rendered = render_template('thread.html', thread=thread, op=op_info, replies=replies)
File "./envs/p37/flask/templating.py", line 140, in render_template
ctx.app,
File "./envs/p37/flask/templating.py", line 120, in _render
rv = template.render(context)
File "./envs/p37/jinja2/environment.py", line 1090, in render
self.environment.handle_exception()
File "./envs/p37/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "./envs/p37/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "./archive-chan/./assets/templates/thread.html", line 60, in top-level template code
<img src="../../assets/image/country/troll/{{ op.troll_country|lower }}.gif" alt="{{ op.troll_country }}" title="{{ reply.country_name }}" class="countryFlag">
File "./envs/p37/jinja2/environment.py", line 471, in getattr
return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'reply' is undefined