pytest-html 3.2.0 error on report generation on Gitlab-CI
pytest-html 3.2.0 error on report generation on Gitlab-CI Observed: error on report generation NB: we have downgraded to version 3.1.1 and everything works well
I think the problem is in: Explicitly add py.xml dependency.
And the issue is the same as: https://github.com/microsoft/pylance-release/issues/2357
Log:
File "/Users/mobile-ci/.pyenv/versions/3.9.16/bin/pytest", line 8, in
- where 4500331456 = id([<'span' tag object 4500315888>, <'span' tag object 4500315728>, <'span' tag object 4500315408>, <'span' tag object 4500313728>])
- and {4500220800: 1, 4500222816: 1, 4500259040: 1, 4500259280: 1, ...} = <py._xmlgen.HtmlVisitor object at 0x10c3bbb20>.visited
Please try 4.0.0rc0
hello, thanks for update i still have an error INTERNALERROR> File "/Users/mobile-ci/builds/8CBqSu93/0/mobility/qa-automation/conftest.py", line 63, in pytest_html_report_title INTERNALERROR> metadata = getattr(report.config, "_metadata") INTERNALERROR> AttributeError: 'Report' object has no attribute 'config'
and I have attached the file where the error occurs
best regards, maria
On Sun, 5 Mar 2023 at 17:08, Jim Brännlund @.***> wrote:
Please try 4.0.0rc0
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1455133301, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCCUF54SVBGPJIP7VNDW2S267ANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.***>
Thank you, I'll look into it.
Can you try 4.0.0rc1 🙇
hello, I have tried both in my local and on CI i get this error
INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/main.py", line 270, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/main.py", line 324, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/main.py", line 349, in pytest_runtestloop INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/conftest.py", line 24, in pytest_runtest_protocol INTERNALERROR> reports = runtestprotocol(item, nextitem=nextitem) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/runner.py", line 131, in runtestprotocol INTERNALERROR> reports.append(call_and_report(item, "call", log)) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/runner.py", line 224, in call_and_report INTERNALERROR> hook.pytest_runtest_logreport(report=report) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pytest_html/basereport.py", line 279, in pytest_runtest_logreport INTERNALERROR> self._config.hook.pytest_html_results_table_row( INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/conftest.py", line 212, in pytest_html_results_table_row INTERNALERROR> cells[5] = html.td([video_link, " ", screenshot_link]) INTERNALERROR> ~~~~~^^^ INTERNALERROR> AttributeError: setitem
br maria
On Mon, 3 Apr 2023 at 22:47, Jim Brännlund @.***> wrote:
Can you try 4.0.0rc1 🙇
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1494960404, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCCECRHG56N2EQTGKZ3W7MZP3ANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.***>
Try:
cells.insert(5, html.td([video_link, " ", screenshot_link])) On 5 Apr 2023 at 17:46 +0200, musjaster @.***>, wrote:
hello, I have tried both in my local and on CI i get this error
INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/main.py", line 270, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/main.py", line 324, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/main.py", line 349, in pytest_runtestloop INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/conftest.py", line 24, in pytest_runtest_protocol INTERNALERROR> reports = runtestprotocol(item, nextitem=nextitem) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/runner.py", line 131, in runtestprotocol INTERNALERROR> reports.append(call_and_report(item, "call", log)) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/runner.py", line 224, in call_and_report INTERNALERROR> hook.pytest_runtest_logreport(report=report) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pytest_html/basereport.py", line 279, in pytest_runtest_logreport INTERNALERROR> self._config.hook.pytest_html_results_table_row( INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_hooks.py", line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_manager.py", line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_result.py", line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py", line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/conftest.py", line 212, in pytest_html_results_table_row INTERNALERROR> cells[5] = html.td([video_link, " ", screenshot_link]) INTERNALERROR> ~~~~~^^^ INTERNALERROR> AttributeError: setitem
br maria
On Mon, 3 Apr 2023 at 22:47, Jim Brännlund @.***> wrote:
Can you try 4.0.0rc1 🙇
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1494960404, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCCECRHG56N2EQTGKZ3W7MZP3ANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
hello the problem is fixed, thanks report is generated but i have problems with title, would you please recommend? i send you the old one (backend_api_v3 and the new one: report_backend)
br maria
On Wed, 5 Apr 2023 at 17:50, Jim Brännlund @.***> wrote:
Try:
cells.insert(5, html.td([video_link, " ", screenshot_link])) On 5 Apr 2023 at 17:46 +0200, musjaster @.***>, wrote:
hello, I have tried both in my local and on CI i get this error
INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/main.py",
line 270, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/main.py",
line 324, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_hooks.py",
line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_manager.py",
line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py",
line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_result.py",
line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py",
line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/main.py",
line 349, in pytest_runtestloop INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_hooks.py",
line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_manager.py",
line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py",
line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_result.py",
line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py",
line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/conftest.py", line 24, in pytest_runtest_protocol INTERNALERROR> reports = runtestprotocol(item, nextitem=nextitem) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/runner.py",
line 131, in runtestprotocol INTERNALERROR> reports.append(call_and_report(item, "call", log)) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/_pytest/runner.py",
line 224, in call_and_report INTERNALERROR> hook.pytest_runtest_logreport(report=report) INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_hooks.py",
line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_manager.py",
line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py",
line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_result.py",
line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py",
line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pytest_html/basereport.py",
line 279, in pytest_runtest_logreport INTERNALERROR> self._config.hook.pytest_html_results_table_row( INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_hooks.py",
line 265, in call INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_manager.py",
line 80, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py",
line 60, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_result.py",
line 60, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File
"/Users/user/repos/qa-automation/.msenv/lib/python3.11/site-packages/pluggy/_callers.py",
line 39, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/Users/user/repos/qa-automation/conftest.py", line 212, in pytest_html_results_table_row INTERNALERROR> cells[5] = html.td([video_link, " ", screenshot_link]) INTERNALERROR> ~~~~~^^^ INTERNALERROR> AttributeError: setitem
br maria
On Mon, 3 Apr 2023 at 22:47, Jim Brännlund @.***> wrote:
Can you try 4.0.0rc1 🙇
— Reply to this email directly, view it on GitHub < https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1494960404 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/A5BGMCCECRHG56N2EQTGKZ3W7MZP3ANCNFSM6AAAAAATOUFFEE
. You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1497720916, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCETYX3SUTSFDDGD4DTW7WIEJANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.***>
What’s the problem with title?
[<'span' tag object 4552053360>, <'span' tag object 4552054000>, <'span' tag object 4552053920>, <'span' tag object 4552054160>] instead of Backend Test Report CERT_5.0.3
generated with this function
def pytest_html_report_title(report): """ Hook called when creating the html report title section """ metadata = getattr(report.config, "metadata") app_version = metadata.get("App version", "N/A") try: os_name = metadata["CI_JOB_STAGE"].split("")[0] if os_name == "ios": os_name = "iOS" else: os_name = os_name.capitalize() except KeyError: os_name = "Automated" report.title = [ html.span( html.a( "⇦", href="https://mobility.gitlabpages.kdsneo.kds.com/qa-automation/", style="color:rgb(68, 68, 68);background:transparent", ) ), html.span(f"{os_name} Test Report", style="padding: 2%"), html.span(app_version, id="version"), html.span(datetime.now(), id="report_time", style="display: none;"), ]
br maria
On Wed, 5 Apr 2023 at 18:41, Jim Brännlund @.***> wrote:
What’s the problem with title?
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1497803122, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCG6YRNW424IVEQUJ5DW7WODBANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.***>
Has this worked previously?
Because title is just a text-field. It doesn’t parse HTML.
there are now just 4 spans with tag_objects generated by this html.span( html.a( "⇦", href="https://mobility.gitlabpages.kdsneo.kds.com/qa-automation/", style="color:rgb(68, 68, 68);background:transparent", ) ), html.span(f"{os_name} Test Report", style="padding: 2%"), html.span(app_version, id="version"), html.span(datetime.now(), id="report_time", style="display: none;"),
and before it was like
Backend/iOS/Android Report v. Tested_version
On Wed, 5 Apr 2023 at 19:31, Jim Brännlund @.***> wrote:
Has this worked previously?
Because title is just a text-field. It doesn’t parse HTML.
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1497866549, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCDKD4KOICBQ2H4VMQ3W7WT6JANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.***>
Can you share a screenshot of how it used to look?
Was the title clickable?
actually i have sent you the 2 reports with old/new version title was not clickable except an arrow icon that leads to summary page
On Wed, 5 Apr 2023 at 19:59, Jim Brännlund @.***> wrote:
Can you share a screenshot of how it used to look?
Was the title clickable?
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1497897936, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCHQAYXJR3UGNJ4WD4TW7WXJNANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.***>
In https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1460320712 you write "and I have attached the file where the error occurs", but the comment is sent via email, and I don't think attachments are visible then.
You have to actually visit this issue and attach them manually.
So I went through the history, specifically this PR (and this one), and the intention (which the contributor actually noted) was never for the title to be anything other than text.
I would suggest logging a new issue with a feature request of making title clickable.
In the meantime my suggestion is to use the summary (prefix) hook to achieve what you're looking for.
i'm attaching the reports here Archive.zip
In the meantime my suggestion is to use the
summary (prefix) hookto achieve what you're looking for.
what i see in your link is:
from py.xml import html
but with new version pytest-html i have the warning DeprecationWarning: The 'py' module is deprecated and support will be removed in a future release. so another question are you going to stop using deprecated modules? ;)
Hello, yes i have taken a look, it seems you're right the report title was fixed to be just text but it is strange that before it was more flexible, and now it is really just a text....
br maria
On Wed, 5 Apr 2023 at 20:35, Jim Brännlund @.***> wrote:
So I went through the history, specifically this PR https://github.com/pytest-dev/pytest-html/pull/270 (and this one https://github.com/pytest-dev/pytest-html/pull/420), and the intention (which the contributor actually noted) was never for the title to be anything other than text.
I would suggest logging a new issue with a feature request of making title clickable.
In the meantime my suggestion is to use the summary (prefix) hook https://pytest-html.readthedocs.io/en/latest/user_guide.html#additional-summary-information to achieve what you're looking for.
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1497947995, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCBXQJWZWYHXE6O35YDW7W3QPANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.***>
In the meantime my suggestion is to use the
summary (prefix) hookto achieve what you're looking for.what i see in your link is:
from py.xml import html
but with new version pytest-html i have the warning DeprecationWarning: The 'py' module is deprecated and support will be removed in a future release. so another question are you going to stop using deprecated modules? ;)
Thanks for pointing that out. I just need to update the docs. As you can see in the same box, we're actually not using the imported module.
And we're not using the py-module in code.
We transform your code if you're using it. 😊
yes, I have seen but what I need to do to avoid the warning? stop using it too? or i can use another module on its place you see the report was done long ago on our project and it is working well thus i don't want to see warning, but from the other hand if i need to rewrite everything to get rid of them .... it would be not very productive
On Thu, 6 Apr 2023 at 10:08, Jim Brännlund @.***> wrote:
In the meantime my suggestion is to use the summary (prefix) hook https://pytest-html.readthedocs.io/en/latest/user_guide.html#additional-summary-information to achieve what you're looking for.
what i see in your link is:
from py.xml import html
but with new version pytest-html i have the warning DeprecationWarning: The 'py' module is deprecated and support will be removed in a future release. so another question are you going to stop using deprecated modules? ;)
Thanks for pointing that out. I just need to update the docs. As you can see in the same box, we're actually not using the imported module.
And we're not using the py-module in code.
We transform https://github.com/pytest-dev/pytest-html/blob/master/src/pytest_html/table.py#L44 your code if you're using it. 😊
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1498657091, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCC7G7URQXMY3OIEWZLW7Z2XPANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.***>
yes, I have seen but what I need to do to avoid the warning? stop using it too? or i can use another module on its place you see the report was done long ago on our project and it is working well thus i don't want to see warning, but from the other hand if i need to rewrite everything to get rid of them .... it would be not very productive … On Thu, 6 Apr 2023 at 10:08, Jim Brännlund @.> wrote: In the meantime my suggestion is to use the summary (prefix) hook https://pytest-html.readthedocs.io/en/latest/user_guide.html#additional-summary-information to achieve what you're looking for. what i see in your link is: from py.xml import html but with new version pytest-html i have the warning DeprecationWarning: The 'py' module is deprecated and support will be removed in a future release. so another question are you going to stop using deprecated modules? ;) Thanks for pointing that out. I just need to update the docs. As you can see in the same box, we're actually not using the imported module. And we're not using the py-module in code. We transform https://github.com/pytest-dev/pytest-html/blob/master/src/pytest_html/table.py#L44 your code if you're using it. 😊 — Reply to this email directly, view it on GitHub <#578 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCC7G7URQXMY3OIEWZLW7Z2XPANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.>
To avoid the warning you can add filterwarnings: https://docs.pytest.org/en/6.2.x/warnings.html#deprecationwarning-and-pendingdeprecationwarning
I would however recommend stop using it, since the py lib itself is deprecated AND has a security vuln: https://github.com/pytest-dev/py/issues/287
Also note that the filterwarning will only work until we remove support, then it will start failing hard.
Depending on how much usage you have you can write a migration script to replace it.
no, i don't want to filter warnings i will try to replace this lib
thanks for your help
On Thu, 6 Apr 2023 at 11:00, Jim Brännlund @.***> wrote:
yes, I have seen but what I need to do to avoid the warning? stop using it too? or i can use another module on its place you see the report was done long ago on our project and it is working well thus i don't want to see warning, but from the other hand if i need to rewrite everything to get rid of them .... it would be not very productive … <#m_-6417366429467153907_> On Thu, 6 Apr 2023 at 10:08, Jim Brännlund @.> wrote: In the meantime my suggestion is to use the summary (prefix) hook https://pytest-html.readthedocs.io/en/latest/user_guide.html#additional-summary-information https://pytest-html.readthedocs.io/en/latest/user_guide.html#additional-summary-information to achieve what you're looking for. what i see in your link is: from py.xml import html but with new version pytest-html i have the warning DeprecationWarning: The 'py' module is deprecated and support will be removed in a future release. so another question are you going to stop using deprecated modules? ;) Thanks for pointing that out. I just need to update the docs. As you can see in the same box, we're actually not using the imported module. And we're not using the py-module in code. We transform https://github.com/pytest-dev/pytest-html/blob/master/src/pytest_html/table.py#L44 https://github.com/pytest-dev/pytest-html/blob/master/src/pytest_html/table.py#L44 your code if you're using it. 😊 — Reply to this email directly, view it on GitHub <#578 (comment) https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1498657091>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCC7G7URQXMY3OIEWZLW7Z2XPANCNFSM6AAAAAATOUFFEE https://github.com/notifications/unsubscribe-auth/A5BGMCC7G7URQXMY3OIEWZLW7Z2XPANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.>
To avoid the warning you can either add filterwarnings: https://docs.pytest.org/en/6.2.x/warnings.html#deprecationwarning-and-pendingdeprecationwarning
I would however recommend stop using it, since the py lib itself is deprecated AND has a security vuln: pytest-dev/py#287 https://github.com/pytest-dev/py/issues/287
Also note that the filterwarning will only work until we remove support, then it fail hard.
Depending on how much usage you have you can write a migration script to replace it.
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1498722021, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCCKVBP7E4WELPQAQNTW72A37ANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.***>
hello, i know that these are not related issues to this bug but i have noticed that
- skipped tests are not shown in result table
- render_collapsed is not working any more
br maria
On Thu, 6 Apr 2023 at 11:38, masha @.***> wrote:
no, i don't want to filter warnings i will try to replace this lib
thanks for your help
On Thu, 6 Apr 2023 at 11:00, Jim Brännlund @.***> wrote:
yes, I have seen but what I need to do to avoid the warning? stop using it too? or i can use another module on its place you see the report was done long ago on our project and it is working well thus i don't want to see warning, but from the other hand if i need to rewrite everything to get rid of them .... it would be not very productive … <#m_-788494684657641699_m_-6417366429467153907_> On Thu, 6 Apr 2023 at 10:08, Jim Brännlund @.> wrote: In the meantime my suggestion is to use the summary (prefix) hook https://pytest-html.readthedocs.io/en/latest/user_guide.html#additional-summary-information https://pytest-html.readthedocs.io/en/latest/user_guide.html#additional-summary-information to achieve what you're looking for. what i see in your link is: from py.xml import html but with new version pytest-html i have the warning DeprecationWarning: The 'py' module is deprecated and support will be removed in a future release. so another question are you going to stop using deprecated modules? ;) Thanks for pointing that out. I just need to update the docs. As you can see in the same box, we're actually not using the imported module. And we're not using the py-module in code. We transform https://github.com/pytest-dev/pytest-html/blob/master/src/pytest_html/table.py#L44 https://github.com/pytest-dev/pytest-html/blob/master/src/pytest_html/table.py#L44 your code if you're using it. 😊 — Reply to this email directly, view it on GitHub <#578 (comment) https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1498657091>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCC7G7URQXMY3OIEWZLW7Z2XPANCNFSM6AAAAAATOUFFEE https://github.com/notifications/unsubscribe-auth/A5BGMCC7G7URQXMY3OIEWZLW7Z2XPANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.>
To avoid the warning you can either add filterwarnings: https://docs.pytest.org/en/6.2.x/warnings.html#deprecationwarning-and-pendingdeprecationwarning
I would however recommend stop using it, since the py lib itself is deprecated AND has a security vuln: pytest-dev/py#287 https://github.com/pytest-dev/py/issues/287
Also note that the filterwarning will only work until we remove support, then it fail hard.
Depending on how much usage you have you can write a migration script to replace it.
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1498722021, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCCKVBP7E4WELPQAQNTW72A37ANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.***>
- I can’t repro this. Can you provide how to repro?
- The ini-config or query param?
- no sorry, I was wrong, I was looking at the old report
- ini config render_collapsed = True i have not understood where to put query param frankly speaking
br
On Fri, 7 Apr 2023 at 10:08, Jim Brännlund @.***> wrote:
- I can’t repro this. Can you provide how to repro?
- The ini-config or query param?
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1500053354, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCAYCCYNBSC4NNRTTRDW77DQTANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.***>
- no sorry, I was wrong, I was looking at the old report 2. ini config render_collapsed = True i have not understood where to put query param frankly speaking br …
- Super ☺️
- Try ”all” instead of true (you can now pass the same in the ini as in query, check docs)
- it is reproduced, skipped are not in report (in 3.1.1 it works)
- i have tried render_collapsed = All - it is working
On Fri, 7 Apr 2023 at 11:30, Jim Brännlund @.***> wrote:
no sorry, I was wrong, I was looking at the old report 2. ini config render_collapsed = True i have not understood where to put query param frankly speaking br … <#m_-9147140147241880367_>
Super ☺️
Try ”all” instead of true (you can now pass the same in the ini as in query, check docs)
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest-html/issues/578#issuecomment-1500116932, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BGMCAFLZ32YCC4B7PIWX3W77NERANCNFSM6AAAAAATOUFFEE . You are receiving this because you authored the thread.Message ID: @.***>
maybe it happens because SKIP is imported not directly from pytest, but is redefined in test.py ?
Is it just the summary or are they missing in the table (as rows) as well?
If pytest reports it, so should the html report