Skip to content
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

XML Report Chunk Error #359

Closed
nedbat opened this issue Feb 14, 2015 · 11 comments
Closed

XML Report Chunk Error #359

nedbat opened this issue Feb 14, 2015 · 11 comments
Labels
bug Something isn't working xml

Comments

@nedbat
Copy link
Owner

nedbat commented Feb 14, 2015

Originally reported by Justin Poehnelt (Bitbucket: justinwp, GitHub: justinwp)


Here is what I am running...

coverage run --source=gfsad setup.py test
coverage html 

Those two work just fine and results are as expected. But when I run:

coverage xml

I get the following:

Traceback (most recent call last):
  File "/Users/justin/venv/GFSAD_VENV/bin/coverage", line 9, in <module>
    load_entry_point('coverage==3.7.1', 'console_scripts', 'coverage')()
  File "/Users/justin/venv/GFSAD_VENV/lib/python2.7/site-packages/coverage/cmdline.py", line 721, in main
    status = CoverageScript().command_line(argv)
  File "/Users/justin/venv/GFSAD_VENV/lib/python2.7/site-packages/coverage/cmdline.py", line 464, in command_line
    total = self.coverage.xml_report(outfile=outfile, **report_args)
  File "/Users/justin/venv/GFSAD_VENV/lib/python2.7/site-packages/coverage/control.py", line 694, in xml_report
    return reporter.report(morfs, outfile=outfile)
  File "/Users/justin/venv/GFSAD_VENV/lib/python2.7/site-packages/coverage/xmlreport.py", line 56, in report
    self.report_files(self.xml_file, morfs)
  File "/Users/justin/venv/GFSAD_VENV/lib/python2.7/site-packages/coverage/report.py", line 84, in report_files
    report_fn(cu, self.coverage._analyze(cu))
  File "/Users/justin/venv/GFSAD_VENV/lib/python2.7/site-packages/coverage/xmlreport.py", line 117, in xml_file
    branch_stats = analysis.branch_stats()
  File "/Users/justin/venv/GFSAD_VENV/lib/python2.7/site-packages/coverage/results.py", line 176, in branch_stats
    exit_counts = self.parser.exit_counts()
  File "/Users/justin/venv/GFSAD_VENV/lib/python2.7/site-packages/coverage/misc.py", line 75, in _wrapped
    setattr(self, attr, fn(self))
  File "/Users/justin/venv/GFSAD_VENV/lib/python2.7/site-packages/coverage/parser.py", line 252, in exit_counts
    for l1, l2 in self.arcs():
  File "/Users/justin/venv/GFSAD_VENV/lib/python2.7/site-packages/coverage/misc.py", line 75, in _wrapped
    setattr(self, attr, fn(self))
  File "/Users/justin/venv/GFSAD_VENV/lib/python2.7/site-packages/coverage/parser.py", line 236, in arcs
    for l1, l2 in self.byte_parser._all_arcs():
  File "/Users/justin/venv/GFSAD_VENV/lib/python2.7/site-packages/coverage/parser.py", line 632, in _all_arcs
    arcs.update(bp._arcs())
  File "/Users/justin/venv/GFSAD_VENV/lib/python2.7/site-packages/coverage/parser.py", line 598, in _arcs
    next_chunk = byte_chunks[ex]
KeyError: 41564

@nedbat
Copy link
Owner Author

nedbat commented Feb 14, 2015

@JustinWP Can you provide me a reproducible test case? Even if it's a repo with your project, or a zip file with your code in it? I've never seen that error before, and I don't understand what the XML report would be doing that the HTML report would not.

@nedbat
Copy link
Owner Author

nedbat commented Feb 15, 2015

Original comment by Justin Poehnelt (Bitbucket: justinwp, GitHub: justinwp)


https://github.com/justinwp/croplands

@nedbat
Copy link
Owner Author

nedbat commented Feb 15, 2015

Original comment by Justin Poehnelt (Bitbucket: justinwp, GitHub: justinwp)


Just cloned it and tried on a fresh install of ubuntu with same result.

@nedbat
Copy link
Owner Author

nedbat commented Feb 17, 2015

Thanks, I can reproduce the issue with this repo. It's because of gfsad/utils/countries.py, which is an unusual file :)

@nedbat
Copy link
Owner Author

nedbat commented Feb 17, 2015

Fixed in 92bf73c89a4b (bb)

@nedbat
Copy link
Owner Author

nedbat commented May 5, 2015

Issue #368 was marked as a duplicate of this issue.

@nedbat
Copy link
Owner Author

nedbat commented May 13, 2015

Original comment by Derek Miller (Bitbucket: 20miller10, GitHub: Unknown)


I am still seeing this error even in your 4.0a5 branch (which is the version that has the fix based on the commit above). Any thoughts as to why this would be?

@nedbat
Copy link
Owner Author

nedbat commented May 13, 2015

4.0a5 was released on 16 Feb, the day before this fix.

@nedbat
Copy link
Owner Author

nedbat commented May 13, 2015

Original comment by Derek Miller (Bitbucket: 20miller10, GitHub: Unknown)


Ahh. Ok thanks for the quick reply. I will keep an eye out for the next release.

@nedbat
Copy link
Owner Author

nedbat commented Jun 5, 2015

Original comment by gpshead (Bitbucket: gpshead, GitHub: gpshead)


Issue #373 was marked as a duplicate of this issue.

@nedbat
Copy link
Owner Author

nedbat commented Aug 27, 2015

BTW: countries.py has changed, but this is the version that caused the crash: https://github.com/justinwp/croplands/blob/83874e8efd532d2efe324231ec8875377cd9759a/gfsad/utils/countries.py

@nedbat nedbat closed this as completed Aug 27, 2015
@nedbat nedbat added major bug Something isn't working xml labels Jun 23, 2018
openstack-gerrit pushed a commit to openstack/python-barbicanclient that referenced this issue Oct 1, 2019
We seem to be running into a coverage issue [1] in 4.0.  This patch
raises the lower bound of coverage to 4.1 to get the lower-constraints
target to pass again.

[1] nedbat/coveragepy#359

Change-Id: Ieddef753b4ee3e9b6d246168ed17c5c99e084564
openstack-gerrit pushed a commit to openstack/openstack that referenced this issue Oct 1, 2019
* Update python-barbicanclient from branch 'master'
  - Fix lower-constraints tox target
    
    We seem to be running into a coverage issue [1] in 4.0.  This patch
    raises the lower bound of coverage to 4.1 to get the lower-constraints
    target to pass again.
    
    [1] nedbat/coveragepy#359
    
    Change-Id: Ieddef753b4ee3e9b6d246168ed17c5c99e084564
openstack-gerrit pushed a commit to openstack/python-barbicanclient that referenced this issue Oct 1, 2019
We seem to be running into a coverage issue [1] in 4.0.  This patch
raises the lower bound of coverage to 4.1 to get the lower-constraints
target to pass again.

[1] nedbat/coveragepy#359

Change-Id: Ieddef753b4ee3e9b6d246168ed17c5c99e084564
openstack-gerrit pushed a commit to openstack/python-barbicanclient that referenced this issue Oct 2, 2019
We seem to be running into a coverage issue [1] in 4.0.  This patch
raises the lower bound of coverage to 4.1 to get the lower-constraints
target to pass again.

Update sphinx requirements to match global-requirements.

[1] nedbat/coveragepy#359

Change-Id: Ieddef753b4ee3e9b6d246168ed17c5c99e084564
(cherry picked from commit 79f387f)
openstack-gerrit pushed a commit to openstack/python-barbicanclient that referenced this issue Oct 2, 2019
We seem to be running into a coverage issue [1] in 4.0.  This patch
raises the lower bound of coverage to 4.1 to get the lower-constraints
target to pass again.

[1] nedbat/coveragepy#359

Change-Id: Ieddef753b4ee3e9b6d246168ed17c5c99e084564
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working xml
Projects
None yet
Development

No branches or pull requests

1 participant