Tree-html 1.1.2 crashes on macOS

The program is this: https://pypi.org/project/tree-html/

In macOS I try to scan inside some directory and crashes:

$ tree-html .
Traceback (most recent call last):
  File "/opt/homebrew/bin/tree-html", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tree_html/run.py", line 107, in main
    html_path.write_text(render_template("index.html", params=params))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tree_html/render_assets.py", line 22, in render_template
    return load_template(template_file).render(**params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/opt/homebrew/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/opt/homebrew/lib/python3.11/site-packages/tree_html/templates/index.html", line 30, in top-level template code
    {%- for item in tree recursive %}
^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tree_html/templates/index.html", line 44, in template
    <ul class="cd-accordion__sub cd-accordion__sub--l{{ loop.depth }}">{{ loop(item["contents"]) }}</ul>
^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tree_html/templates/index.html", line 44, in template
    <ul class="cd-accordion__sub cd-accordion__sub--l{{ loop.depth }}">{{ loop(item["contents"]) }}</ul>
^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tree_html/templates/index.html", line 44, in template
    <ul class="cd-accordion__sub cd-accordion__sub--l{{ loop.depth }}">{{ loop(item["contents"]) }}</ul>
^^^^^^^^^
  [Previous line repeated 6 more times]
  File "/opt/homebrew/lib/python3.11/site-packages/tree_html/templates/index.html", line 38, in template
    {%- if (item["contents"]|length) == 1 -%}
^
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'contents'

A better place to report your problem would be the issue tracker of that particular project. They will be the ones fixing the unhandled exception.

Does it have a public source code repository with bug tracker?

To find out see what information the authors put on its PyPI page.