Skip to content

Exporting report with tags to Excel fails #1951

Open
@jkl1337

Description

Attempting to export a report containing a frozenset column (so tags at least) to Excel causes a 500 error.

Exception on /beancount/download-query/query_result.xlsx [GET]
Traceback (most recent call last):
  File "/home/hambone/.local/share/uv/tools/fava/lib/python3.13/site-packages/openpyxl/worksheet/_write_only.py", line 133, in _values_to_row
    cell.value = value
    ^^^^^^^^^^
  File "/home/hambone/.local/share/uv/tools/fava/lib/python3.13/site-packages/openpyxl/cell/cell.py", line 218, in value
    self._bind_value(value)
    ~~~~~~~~~~~~~~~~^^^^^^^
  File "/home/hambone/.local/share/uv/tools/fava/lib/python3.13/site-packages/openpyxl/cell/cell.py", line 187, in _bind_value
    raise ValueError("Cannot convert {0!r} to Excel".format(value))
ValueError: Cannot convert frozenset() to Excel

Looks like this might be straightforwardish to fix. I'll look into later.

Additionally if a tags column that is empty gets exported as CSV it comes out as frozenset().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions