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

incorrect path to orphaned .pyc files #60

Closed
nedbat opened this issue Apr 12, 2010 · 1 comment
Closed

incorrect path to orphaned .pyc files #60

nedbat opened this issue Apr 12, 2010 · 1 comment
Labels
bug Something isn't working

Comments

@nedbat
Copy link
Owner

nedbat commented Apr 12, 2010

Originally reported by Zooko O'Whielacronx (Bitbucket: zooko, GitHub: zooko)


If you have a .pyc file with no corresponding .py file then coverage.py will print out an error message and stop generation of the HTML output. The problem is that the error message gives the wrong path to the module -- using the CWD instead of the actual location of the .pyc file.

No source for code: '/Users/wade/src/simplegeo/SG/init.py'

In this case it turned out to have nothing to do with /Users/wade/src/simplegeo/SG - there was actually an orphaned __init__.pyc file in a different directory that was also in the PYTHONPATH.

As a bonus it would be nice if coverage.py could detect that the problem is a present .pyc file and absent .py file, but at least if it reports correct information about the path/name of the broken module that would make it easier for users to figure out their problem.


@nedbat
Copy link
Owner Author

nedbat commented Nov 24, 2012

Fixed in <<changeset a3542c92bf3e (bb)>>.

@nedbat nedbat closed this as completed Nov 24, 2012
@nedbat nedbat added major bug Something isn't working labels Jun 23, 2018
agronholm pushed a commit to agronholm/coveragepy that referenced this issue Aug 16, 2020
A Condition frequently must be created with an explicit lock. All three libraries support this.
agronholm added a commit to agronholm/coveragepy that referenced this issue Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant