Couldn't find chunk error when running coverage html

Issue #612 invalid
Andrew de Jonge
created an issue

I'm new to the coverage library for python. But I've immediately encountered a problem and I can't find mention of it on google..

In my virtual environment (pipenv) I do:

pipenv install coverage==3.6
coverage run manage.py test <app-name>
coverage report
coverage html

All of them work nicely, I get a nice text report in my shell, but when I run coverage html it crashes...

Traceback (most recent call last):
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\parser.py", line 571, in _arcs
    ch = byte_chunks[byte]
KeyError: 22318

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\programming\Lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "d:\programming\Lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Win7\.virtualenvs\app-87mb2psT\Scripts\coverage.exe\__main__.py", line 9, in <module>
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\cmdline.py", line 710, in main
    status = CoverageScript().command_line(argv)
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\cmdline.py", line 452, in command_line
    **report_args)
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\control.py", line 615, in html_report
    return reporter.report(morfs)
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\html.py", line 90, in report
    self.report_files(self.html_file, morfs, self.config.html_dir)
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\report.py", line 84, in report_files
    report_fn(cu, self.coverage._analyze(cu))
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\html.py", line 164, in html_file
    missing_branch_arcs = analysis.missing_branch_arcs()
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\results.py", line 127, in missing_branch_arcs
    missing = self.arcs_missing()
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\results.py", line 88, in arcs_missing
    possible = self.arc_possibilities()
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\results.py", line 76, in arc_possibilities
    arcs = self.parser.arcs()
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\misc.py", line 73, in _wrapped
    setattr(self, attr, fn(self))
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\parser.py", line 230, in arcs
    for l1, l2 in self.byte_parser._all_arcs():
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\parser.py", line 631, in _all_arcs
    arcs.update(bp._arcs())
  File "c:\users\win7\.virtualenvs\app-87mb2pst\lib\site-packages\coverage\parser.py", line 578, in _arcs

    raise Exception("Couldn't find chunk @ %d" % byte)
Exception: Couldn't find chunk @ 22318

Comments (2)

  1. Log in to comment