Skip to content

KeyError __init__.py not found on sqldata.py #881

Closed
pytest-dev/pytest-cov
#405
@iroussos

Description

@iroussos

Describe the bug
Since v5.0 was released on PyPi, we are getting the following error:

... .... ...
690 INTERNALERROR> Traceback (most recent call last):
691 INTERNALERROR>   File "/usr/local/lib/python3.6/site-packages/_pytest/main.py", line 209, in wrap_session
692 INTERNALERROR>     session.exitstatus = doit(config, session) or 0
693 INTERNALERROR>   File "/usr/local/lib/python3.6/site-packages/_pytest/main.py", line 249, in _main
694 INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
695 INTERNALERROR>   File "/usr/local/lib/python3.6/site-packages/pluggy/hooks.py", line 284, in __call__
696 INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
697 INTERNALERROR>   File "/usr/local/lib/python3.6/site-packages/pluggy/manager.py", line 67, in _hookexec
698 INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
699 INTERNALERROR>   File "/usr/local/lib/python3.6/site-packages/pluggy/manager.py", line 61, in <lambda>
700 INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
701 INTERNALERROR>   File "/usr/local/lib/python3.6/site-packages/pluggy/callers.py", line 203, in _multicall
702 INTERNALERROR>     gen.send(outcome)
703 INTERNALERROR>   File "/usr/local/lib/python3.6/site-packages/pytest_cov/plugin.py", line 229, in pytest_runtestloop
704 INTERNALERROR>     self.cov_controller.finish()
705 INTERNALERROR>   File "/usr/local/lib/python3.6/site-packages/pytest_cov/engine.py", line 167, in finish
706 INTERNALERROR>     self.cov.stop()
707 INTERNALERROR>   File "/usr/local/lib/python3.6/site-packages/coverage/control.py", line 651, in combine
708 INTERNALERROR>     combine_parallel_data(self._data, aliases=aliases, data_paths=data_paths, strict=strict)
709 INTERNALERROR>   File "/usr/local/lib/python3.6/site-packages/coverage/data.py", line 117, in combine_parallel_data
710 INTERNALERROR>     data.update(new_data, aliases=aliases)
711 INTERNALERROR>   File "/usr/local/lib/python3.6/site-packages/coverage/sqldata.py", line 705, in update
712 INTERNALERROR>     for (file, context), numbits in lines.items()
713 INTERNALERROR>   File "/usr/local/lib/python3.6/site-packages/coverage/sqldata.py", line 705, in <listcomp>
714 INTERNALERROR>     for (file, context), numbits in lines.items()
715 INTERNALERROR> KeyError: '/builds/meltano/meltano/src/meltano/__init__.py'

To Reproduce

How can we reproduce the problem? Please be specific.

  1. What version of Python are you using?

Python 3.6

  1. What version of coverage.py are you using? The output of coverage debug sys is helpful.

Latest on PyPi --> 5.0 (coverage-5.0-cp36-cp36m-manylinux1_x86_64.whl)

  1. What versions of what packages do you have installed? The output of pip freeze is helpful.

You can check our full pip install '.[dev]' log in our runner's log together with the pytests and the coverage run afterwards:

https://gitlab.com/meltano/meltano/-/jobs/379770331

  1. What code are you running? Give us a specific commit of a specific repo that we can check out.

https://gitlab.com/meltano/meltano/blob/master/.gitlab/ci/test.gitlab-ci.yml#L46

  1. What commands did you run?

We are running coveragepy as part of our automated tests after our pytests are done:

    - pytest -v --cov-report= --cov meltano -m "$PYTEST_MARKERS"
    - coverage combine .coverage
    - coverage report
    - coverage html

Expected behavior
This was running without issues on the latest pre v5.0 stable release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnot our bugThe problem was elsewhere

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions