Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ngblume opened this issue Mar 2, 2024 · 0 comments
Open

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

ngblume opened this issue Mar 2, 2024 · 0 comments

Comments

@ngblume
Copy link

ngblume commented Mar 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant