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

Type mis match error #811

Open
OnkarNathUpd opened this issue Apr 29, 2024 · 1 comment
Open

Type mis match error #811

OnkarNathUpd opened this issue Apr 29, 2024 · 1 comment

Comments

@OnkarNathUpd
Copy link

I am using pytest-html for report generation. The version is 4.1.1, however I get below error.
"/home/sqm/2060-3/sqm/test/regression/src/sqm_tests/.tox/py38/lib/python3.8/site-packages/pytest_html/report_data.py", line 140, in add_test
INTERNALERROR> test_data["log"] = _handle_ansi("\n".join(logs))
INTERNALERROR> TypeError: sequence item 0: expected str instance, div found

Typecasting "logs" to string, resolves the error and I can generate the report.

Let me know if I need to use pytest-html in different way or this is probable fix for future release.
I am using python3.8.10 for test

@NyAntsaA
Copy link

I've seen similar issue recently. In my case it was due to an override of the pytest_html_results_table_html hook, where one created some html.div section for the report, which has worked fine for earlier versions of pytest-html, but not supported anymore on version 4.1.1.

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

2 participants