sqlite3.OperationalError: disk I/O error - coverage/sqldata.py, line 1024
See original GitHub issueDescribe the bug
Since coverage v5.0.2
, I throw an exception during Python 3.6 testing (Python 3.4, 3.5, 3.7, and 3.8 work fine - source). Below is a screenshot of the exception thrown (source)
This problem does not occur with v5.0.1
(source).
Originally I thought this was a Travis CI issue (source), but it appears specific to the last release of coverage
instead.
To Reproduce How can we reproduce the problem? Please be specific.
- Python v3.6.7
- Ubuntu 16.04.6 LTS
- Kernel: 4.15.0-1028-gcp (xenial container here)
- v5.0.2 of
coverage
(pulled from PyPi/pip) - The following packages are installed:
apprise==0.8.2 asgiref==3.2.3 attrs==19.3.0 certifi==2019.11.28 chardet==3.0.4 Click==7.0 coverage==5.0.2 Django==3.0.2 entrypoints==0.3 filelock==3.0.12 flake8==3.7.9 idna==2.8 importlib-metadata==1.3.0 Markdown==3.1.1 mccabe==0.6.1 mock==3.0.5 more-itertools==8.0.2 oauthlib==3.1.0 packaging==20.0 pluggy==0.13.1 py==1.8.1 pycodestyle==2.5.0 pyflakes==2.1.1 pyparsing==2.4.6 pytest==5.3.2 pytest-cov==2.8.1 pytest-django==3.7.0 pytz==2019.3 PyYAML==5.3 requests==2.22.0 requests-oauthlib==1.3.0 six==1.13.0 sqlparse==0.3.0 toml==0.10.0 tox==3.14.3 urllib3==1.25.7 virtualenv==16.7.9 wcwidth==0.1.8 zipp==0.6.0
- I’m trying to build my package Apprise API which I hadn’t needed to build until of late. Here is the latest build status.
- The command ran was:
coverage run --parallel -m pytest apprise_api
Expected behavior
Not to get an exception (or maybe it just needs to be gracefully caught since it’s on an __exit__
call anyway)?
Additional context If i re-run the Travis-CI runner on a previous Python 3.6 test runner that has passed (in the past), it fails on Python 3.6 (more details and screenshots explained here).
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:63 (25 by maintainers)
Wow, thanks everyone, here and on Hacker News. I’ve summed up the answer in Bug #915: solved!
@caronc Thanks for persisting! I’ll close this as not a coverage issue. The mock should be on NamedTemporaryFile, not on _TemporaryFileWrapper, since the first is the public interface, and is what you actually call in your product code. But I’m curious: the mock is called “mock_ntf” as if it had once been for NamedTemporaryFile. Why is that?
Happens in Ubuntu docker image with circleci too but slight different error message is thrown…
Couldn’t use data file ‘/home/circleci/project/test_results/.coverage’: database disk image is malformed