question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sqlite3.OperationalError: disk I/O error - coverage/sqldata.py, line 1024

See original GitHub issue

Describe 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) Screenshot from 2020-01-06 16-05-07

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.

  1. Python v3.6.7
  2. Ubuntu 16.04.6 LTS
  3. Kernel: 4.15.0-1028-gcp (xenial container here)
  4. v5.0.2 of coverage (pulled from PyPi/pip)
  5. 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
    
  6. 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.
  7. 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:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:63 (25 by maintainers)

github_iconTop GitHub Comments

3reactions
nedbatcommented, Jan 13, 2020

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?

3reactions
geekvikascommented, Jan 6, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

disk I/O error with SQLite3 in Python 3 when writing to a ...
when i run it with line 4 directing the input towards :memory: it works perfectly and i have myself what i think is...
Read more >
disk I/O error in SQLite
There's nothing special in the lines with error, and if I run the command again I get errors in different lines, which means...
Read more >
sqlite3.OperationalError: database or disk is full. - SQLite Forum
I am using jupyter notebook to code in python. I am facing an issue while saving any file or even new file. I...
Read more >
Getting disk I/O error when starting Dropbox app
Hi there! It looks like Dropbox is reporting an Operational disk I/O error. This means that Dropbox can't read from your hard drive....
Read more >
Failure on first run of new project (#1145) · Issues · Meltano ...
OperationalError : disk I/O error The above exception was the direct cause of ... lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/base.py", line 1181, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found