#10638·numba

Failed to collect coverage data with python 3.12, sys.monitoring, numba 0.66.rc1

Author: maxnoeCreated Jun 8, 2026Updated Sep 28, 2026
Labelsneedtriagestale

Reporting a bug

Testing the new numba RC for coverage support, I get an exception at the end of the test run when trying to collect the coverage data:

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/coverage/sqlitedb.py", line 122, in _execute
INTERNALERROR>     return self.con.execute(sql, parameters)  # type: ignore[arg-type]
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> sqlite3.OperationalError: no such table: context
INTERNALERROR> 
INTERNALERROR> During handling of the above exception, another exception occurred:
INTERNALERROR> 
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/coverage/sqlitedb.py", line 127, in _execute
INTERNALERROR>     return self.con.execute(sql, parameters)  # type: ignore[arg-type]
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> sqlite3.OperationalError: no such table: context
INTERNALERROR> 
INTERNALERROR> The above exception was the direct cause of the following exception:
INTERNALERROR> 
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/_pytest/main.py", line 318, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>                          ^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/_pytest/main.py", line 372, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pluggy/_hooks.py", line 512, in __call__
INTERNALERROR>     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pluggy/_callers.py", line 167, in _multicall
INTERNALERROR>     raise exception
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicall
INTERNALERROR>     teardown.throw(exception)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/_pytest/logging.py", line 801, in pytest_runtestloop
INTERNALERROR>     return (yield)  # Run all the tests.
INTERNALERROR>             ^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicall
INTERNALERROR>     teardown.throw(exception)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/_pytest/terminal.py", line 707, in pytest_runtestloop
INTERNALERROR>     result = yield
INTERNALERROR>              ^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pluggy/_callers.py", line 152, in _multicall
INTERNALERROR>     teardown.send(result)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pytest_cov/plugin.py", line 352, in pytest_runtestloop
INTERNALERROR>     self.cov_controller.finish()
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pytest_cov/engine.py", line 44, in ensure_topdir_wrapper
INTERNALERROR>     return meth(self, *args, **kwargs)
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pytest_cov/engine.py", line 363, in finish
INTERNALERROR>     self.cov.save()
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/coverage/control.py", line 855, in save
INTERNALERROR>     data = self.get_data()
INTERNALERROR>            ^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/coverage/control.py", line 935, in get_data
INTERNALERROR>     if self._collector.flush_data():
INTERNALERROR>        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/coverage/collector.py", line 491, in flush_data
INTERNALERROR>     self.covdata.add_lines(self.mapped_file_dict(line_data))
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/coverage/sqldata.py", line 126, in _wrapped
INTERNALERROR>     return method(self, *args, **kwargs)
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/coverage/sqldata.py", line 528, in add_lines
INTERNALERROR>     self._set_context_id()
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/coverage/sqldata.py", line 483, in _set_context_id
INTERNALERROR>     context_id = self._context_id(context)
INTERNALERROR>                  ^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/coverage/sqldata.py", line 458, in _context_id
INTERNALERROR>     row = con.execute_one("SELECT id FROM context WHERE context = ?", (context,))
INTERNALERROR>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/coverage/sqlitedb.py", line 181, in execute_one
INTERNALERROR>     with self.execute(sql, parameters) as cur:
INTERNALERROR>          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/contextlib.py", line 137, in __enter__
INTERNALERROR>     return next(self.gen)
INTERNALERROR>            ^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/coverage/sqlitedb.py", line 144, in execute
INTERNALERROR>     cur = self._execute(sql, parameters)
INTERNALERROR>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/coverage/sqlitedb.py", line 132, in _execute
INTERNALERROR>     raise DataError(f"Couldn't use data file {self.filename!r}: {msg}") from exc
INTERNALERROR> coverage.exceptions.DataError: Couldn't use data file '/home/runner/work/ctapipe/ctapipe/.coverage.runnervm3jyl0.pid3356.Xqkb1CVx': no such table: context

Seen in this CI run: https://github.com/cta-observatory/ctapipe/actions/runs/27126263750/job/80055643765?pr=3019