INTERNALERROR while generating report
kartikdc opened this issue · 1 comments
kartikdc commented
I added some test cases to our test suite now the report generation is failing for some reason. Not sure if it is bug with Tavern or an issue with the test cases I have added so wanted to ask here anyway:
Tavern output
Successfully started server
============================= test session starts ==============================
platform linux -- Python 3.8.10, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/action/actions-runner/_work/github_sync/github_sync/tests, configfile: pytest.ini
plugins: tavern-1.16.2
collected 138 items
tests/test_apis.tavern.yaml ............................................ [ 31%]
......................................
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/_pytest/main.py", line 269, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/_pytest/main.py", line 323, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/_pytest/main.py", line 348, in pytest_runtestloop
INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/_pytest/runner.py", line 109, in pytest_runtest_protocol
INTERNALERROR> runtestprotocol(item, nextitem=nextitem)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/_pytest/runner.py", line 126, in runtestprotocol
INTERNALERROR> reports.append(call_and_report(item, "call", log))
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/_pytest/runner.py", line 217, in call_and_report
INTERNALERROR> report: TestReport = hook.pytest_runtest_makereport(item=item, call=call)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 55, in _multicall
INTERNALERROR> gen.send(outcome)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/_pytest/skipping.py", line 272, in pytest_runtest_makereport
INTERNALERROR> rep = outcome.get_result()
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/_pytest/runner.py", line 337, in pytest_runtest_makereport
INTERNALERROR> return TestReport.from_item_and_call(item, call)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/_pytest/reports.py", line 322, in from_item_and_call
INTERNALERROR> longrepr = item.repr_failure(excinfo)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/tavern/testutils/pytesthook/item.py", line 233, in repr_failure
INTERNALERROR> attach_text(str(error), name="error_output")
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/tavern/testutils/pytesthook/error.py", line 219, in __str__
INTERNALERROR> return self.longreprtext
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/tavern/testutils/pytesthook/error.py", line 214, in longreprtext
INTERNALERROR> self.toterminal(tw)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/tavern/testutils/pytesthook/error.py", line 204, in toterminal
INTERNALERROR> self._print_formatted_stage(tw, stage)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/tavern/testutils/pytesthook/error.py", line 153, in _print_formatted_stage
INTERNALERROR> line = format_keys(line, keys)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/tavern/util/dict_util.py", line 118, in format_keys
INTERNALERROR> formatted = _check_and_format_values(val, box_vars)
INTERNALERROR> File "/tmp/env-tavern/lib/python3.8/site-packages/tavern/util/dict_util.py", line 29, in _check_and_format_values
INTERNALERROR> for (_, field_name, _, _) in would_format:
INTERNALERROR> ValueError: unmatched '{' in format spec
======================== 82 passed in 81.52s (0:01:21) =========================
Error: Process completed with exit code 3.
The pinned version of Tavern is 1.16.2 but I tried upgrading to 1.23.2 and faced the same problem.
Feel free to let me know if I can provide any more information.
kartikdc commented
Seems like this was because of the yaml config being structured improperly.