pytest-reporter-html1 icon indicating copy to clipboard operation
pytest-reporter-html1 copied to clipboard

if key not in seen: TypeError: unhashable type: 'dict'

Open ngblume opened this issue 11 months ago • 0 comments

Hej hej,

I installed the plugin according to the manual: https://github.com/christiansandberg/pytest-reporter-html1 I than added the arguments via addops in my pytest.ini: addopts = --template=html1/index.html --report=tests/reports/report.html -rP --full-trace --color=yes --code-highlight=yes -vv --show-capture=all --log-level=INFO --json=tests/reports/report.json --jsonapi --junitxml=tests/reports/report.xml --csv=tests/reports/report.csv --csv-delimiter=';'

When the tests are passed (just 1 in this case), I get the folowing error at the end of the traceback:

collecting ... collected 1 item

tests/test_gatewayClient.py::TestZmqServerInternalFcts::test_ping PASSED [100%]

Traceback (most recent call last):
  File "{REMOVED}\.vscode\extensions\ms-python.python-2024.2.1\pythonFiles\vscode_pytest\run_pytest_script.py", line 70, in <module>
    pytest.main(arg_array)
.
. (roughly 30 lines removed in the traceback)
.
File "{REMOVED}\__virtualenv\lib\site-packages\pytest_reporter_html1\templates\html1\test.html", line 21, in block 'test_metadata'
    {% for name, value in test.phases|map(attribute='report.user_properties')|chain|unique %}
  File "{REMOVED}\__virtualenv\lib\site-packages\jinja2\filters.py", line 454, in do_unique
    if key not in seen:
TypeError: unhashable type: 'dict'
sys:1: ResourceWarning: unclosed <socket.socket fd=732, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 54706), raddr=('127.0.0.1', 54703)>

I have no idea, what is happening here.. @christiansandberg could you give me a pointer, what / where to look for the source of the error ? Thanks !

Cheers Niels Göran

ngblume avatar Mar 02 '24 00:03 ngblume