Closed
Description
Describe the bug
Since coverage 5.0.2
an sqlite exception is being thrown on Python 3.6 and 3.7. I have not tested 3.8 or any earlier versions.
Traceback (most recent call last):
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/coverage/sqldata.py", line 1033, in execute
return self.con.execute(sql, parameters)
sqlite3.OperationalError: no such table: meta
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/nose/__main__.py", line 8, in <module>
run_exit()
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/nose/core.py", line 121, in __init__
**extra_args)
File "/usr/lib64/python3.6/unittest/main.py", line 95, in __init__
self.runTests()
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/nose/core.py", line 207, in runTests
result = self.testRunner.run(self.test)
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/nose/core.py", line 66, in run
result.printErrors()
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/nose/result.py", line 110, in printErrors
self.config.plugins.report(self.stream)
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/nose/plugins/manager.py", line 99, in __call__
return self.call(*arg, **kw)
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/nose/plugins/manager.py", line 167, in simple
result = meth(*arg, **kw)
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/nose/plugins/cover.py", line 183, in report
self.coverInstance.stop()
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/coverage/control.py", line 670, in combine
self.get_data()
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/coverage/control.py", line 696, in get_data
if self._collector and self._collector.flush_data():
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/coverage/collector.py", line 425, in flush_data
self.covdata.add_lines(self.mapped_file_dict(self.data))
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/coverage/sqldata.py", line 436, in add_lines
self._choose_lines_or_arcs(lines=True)
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/coverage/sqldata.py", line 496, in _choose_lines_or_arcs
('has_arcs', str(int(arcs)))
File "/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/coverage/sqldata.py", line 1048, in execute
raise CoverageException("Couldn't use data file {!r}: {}".format(self.filename, msg))
coverage.misc.CoverageException: Couldn't use data file '/media/workspace/APPNAME/tests/.coverage': no such table: meta
To Reproduce
How can we reproduce the problem? Please be specific.
-
What version of Python are you using?
3.6.8 and 3.7.6 -
What version of coverage.py are you using? The output of
coverage debug sys
is helpful.
5.0.2
-- sys -------------------------------------------------------
version: 5.0.2
coverage: /media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages/coverage/__init__.py
tracer: -none-
CTracer: available
plugins.file_tracers: -none-
plugins.configurers: -none-
plugins.context_switchers: -none-
configs_attempted: .coveragerc
setup.cfg
tox.ini
pyproject.toml
configs_read: -none-
config_file: None
config_contents: -none-
data_file: -none-
python: 3.6.8 (default, Aug 7 2019, 17:28:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
platform: Linux-3.10.0-957.27.2.el7.x86_64-x86_64-with-centos-7.6.1810-Core
implementation: CPython
executable: /media/workspace/APPNAME/tests/venv/bin/python3
def_encoding: utf-8
fs_encoding: utf-8
pid: 20026
cwd: /media/workspace/APPNAME/tests
path: /media/workspace/APPNAME/tests/venv/bin
/usr/lib64/python36.zip
/usr/lib64/python3.6
/usr/lib64/python3.6/lib-dynload
/media/workspace/APPNAME/tests/venv/lib64/python3.6/site-packages
/media/workspace/APPNAME/tests/venv/lib/python3.6/site-packages
environment: PYENV_ROOT = /home/developer/.pyenv
PYENV_SHELL = zsh
PYENV_VIRTUALENV_INIT = 1
command_line: /media/workspace/APPNAME/tests/venv/bin/coverage debug sys
sqlite3_version: 2.6.0
sqlite3_sqlite_version: 3.7.17
- What versions of what packages do you have installed? The output of
pip freeze
is helpful.
beautifulsoup4==4.8.2
bottle==0.12.18
coverage==5.0.2
entrypoints==0.3
flake8==3.7.9
liblpm==0.0.4
mccabe==0.6.1
mysqlclient==1.4.6
nose==1.3.7
pycodestyle==2.5.0
pyflakes==2.1.1
six==1.13.0
soupsieve==1.9.5
SQLAlchemy==1.3.12
waitress==1.4.2
WebOb==1.8.5
WebTest==2.0.33
-
What code are you running? Give us a specific commit of a specific repo that we can check out.
I cannot provide a repo, sorry. It's not an open source project. -
What commands did you run?
python3 -m "nose" --with-coverage --cover-erase --cover-html -s -w unit -v
Expected behavior
An error shouldn't be thrown.
Additional context
It's fine on 5.0.1, just broken on 5.0.2.