-
-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest 5.0 version raises CoverageException: file is not a database #886
Comments
Following up--I've isolated this issue to the latest 5.0 release. |
Can you provide me with instructions to reproduce the issue? |
I only seem to run into this error when attempting to run Interestingly, it seems to work fine when calling the |
I can also reproduce in https://github.com/mozilla-releng/tooltool/ by running:
|
I saw a similar issue when running pytest-cov and coverage through tox. It was resolved by pinning coverage to back to 4.5.4.
|
@mozbhearsum Thanks for the steps. When I try them, it doesn't fail, I thought because you have already pinned coverage==4.5.4 on your master. But when I move back a few commits (to ac7a85d), requirements/test.txt still has coverage pinned. I tried hand-editing the file to use coverage==5.0, but it needs hashes so it wouldn't install. Do you mind giving me a specific hash to check out from your repo that will show the problem? |
Yeah, that's right. |
I tried ac7a85d. It pins coverage==4.5.4: https://github.com/mozilla-releng/tooltool/blob/ac7a85d073fae891aa9166253069f46bb8b30c3e/api/requirements/test.txt#L22 |
On our project this was caused by mixing versions of coverage.py
|
Same here. The test suite used a pinned version (4.5.4) of coverage.py to generate coverage data. The session generating an XML report for upload to Codecov used the latest version (5.0), resulting in said error message. Aligning the versions fixes the issue: |
I've made the error message specific in 0d6a878. Now it will say "Couldn't use data file '.coverage': Looks like a coverage 4.x data file. Are you mixing versions of coverage?" If you are encountering this error, I strongly encourage you not to simply pin coverage==4.5.4, but instead to figure out where the mixed versions are coming from, and upgrade everything to 5.x. |
This is now available in coverage==5.0.1 Please upgrade. If the problem persists, let's debug why. :) |
I'm getting this new error message after upgrading coverage from 4.5.4 to 5.0.4, when running unit tests on a package that previously used coverage 4. Is there a procedure for moving from 4 --> 5? Is there a way to have it update the .coverage file? Thanks! |
@lzkelley can you provide me with a way to reproduce your problem? |
Our coverage report is failing as of this weekend. It's failing on Python 2 and 3.
Stack trace below. Thanks for the help!
The text was updated successfully, but these errors were encountered: