-
Notifications
You must be signed in to change notification settings - Fork 22
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
Error when reading .coverage file #39
Comments
Can you upload the .coverage file or provide details about where it came from? The error suggests the file is not a valid python coverage file. |
Sure, here is the file https://drive.google.com/file/d/1SpHT06QoMvtz13NyQkM6UeOGoDSuI25W/view?usp=sharing . |
Looks like i figured it out, previous .coverage file was produced by using |
oh no, it only works in separate python file
but error still occurs when running ':CoverageShow' |
And the same error from Might also be room to improve that error if we can narrow down a clear failure scenario and how to detect it in our code. |
It was the same error. Turns out the error occurs because I forgot to activate virtualenv and I was using the older version of coverage in my os.
It's working fine when I use the newer can we catch this kind of error and rewrite it to a more informative error ? |
Oof, yeah, I'd hope we could detect those kinds of trivial format compatibility issues, but that error from coverage is pretty nonspecific. Do you know if there's any helper to inspect the old format or good heuristic to check for files in the old format? |
I've searched for the correct pytest version that produced the older format, but sadly, I couldn't find any. Best I can think of right now is to catch this error |
👍 I imagine providing a little context and trimming out some of the noise from that error would be a major improvement. In this case the one CoverageException line contains the essential info. Ideally the error would look something like That said, could take me quite some time to get around to submitting a fix. Contributions would be very welcome! |
Nice, I'll find some time to work on this one if that's ok |
Yes, that would be great! You can include the coverage version from |
Having the same issue. The traceback tells that plugin tries to read file
That is the case since coveragepy==5.0a2. The code supporting JSON format has then been removed in coveragepy==5.0a6. Just tested that reverting to |
Oh, so probably it was the same unsupported SQLite issue all along! That sounds like we could catch and give a much more user-friendly message for this case, when it hits a |
lib version
The text was updated successfully, but these errors were encountered: