mosra / m.css

A no-nonsense, no-JavaScript CSS framework, site and documentation theme for content-oriented websites
https://mcss.mosra.cz
Other
409 stars 92 forks source link

TypeError: 'coroutine' object is not subscriptable #124

Closed timmi-on-rails closed 4 years ago

timmi-on-rails commented 4 years ago

I followed the instructions at https://mcss.mosra.cz/documentation/doxygen/#basic-usage and I get the following error.

Tested with python 3.6, 3.7 and 3.8 and doxygen 1.8.15 and 1.8.17 I even tried using an empty directory and empty Doxyfile -> same error.

Any idea?

Traceback (most recent call last):
  File "./doxygen.py", line 3692, in <module>
    run(doxyfile, templates=os.path.abspath(args.templates), wildcard=args.wildcard, index_pages=args.index_pages, search_merge_subtrees=not args.search_no_subtree_merging, search_add_lookahead_barriers=not args.search_no_lookahead_barriers, search_merge_prefixes=not args.search_no_prefix_merging)
  File "./doxygen.py", line 3578, in run
    **state.doxyfile)
  File "/usr/local/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 73, in render
    return loop.run_until_complete(self.render_async(*args, **kwargs))
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 488, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 65, in render_async
    return self.environment.handle_exception()
  File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.6/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 25, in concat_async
    await collect()
  File "/usr/local/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 22, in collect
    async for event in async_gen:
  File "/m.css/documentation/templates/doxygen/file.html", line 1, in top-level template code
    {% extends 'base-reference.html' %}
  File "/m.css/documentation/templates/doxygen/base-reference.html", line 20, in top-level template code
    {% macro details_define(define) %}{% include 'details-define.html' %}{% endmacro %}
  File "/m.css/documentation/templates/doxygen/base.html", line 109, in top-level template code
    {% block main %}
  File "/m.css/documentation/templates/doxygen/base-reference.html", line 23, in block "main"
    {% block header %}
  File "/m.css/documentation/templates/doxygen/file.html", line 7, in block "header"
    {%+ for name, target in compound.breadcrumb[:-1] %}<span class="m-breadcrumb"><a href="{{ target }}">{{ name }}</a>/</span>{% endfor %}{{ compound.breadcrumb[-1][0] }} <span class="m-thin">file</span>{% if compound.since %} {{ compound.since }}{% endif %}
TypeError: 'coroutine' object is not subscriptable
timmi-on-rails commented 4 years ago

jinja2 version 2.11.0 seems to be the problem. I tryed pip install jinja2==2.10.3 (as in your last suceeding circle ci build) and it works!

mosra commented 4 years ago

Sometimes when I wait long enough the bug just fixes itself :)

Running on 2.11.2 and not having this issue. Looking at the changelogs this was fixed in 2.11.1 (https://github.com/pallets/jinja/issues/1141), so I guess nothing left to do here :tada: