Use a more accurate error message if loading of noxfile runs into error #272
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had a
noxfile.py
which looked something like:While running this with
nox
, I kept running into an odd:Pretty sure the file was there and I also checked the file permissions and other usual suspects. Couldn't make much sense out of it so looked into the source code of
nox
and realized that this error message is inaccurate. In fact, this has been reported as an issue at #248.The commit in this PR, changes the log message to more accurately describe what went wrong and also include a trace back of the actual exception to help diagonize the issue. Any reviews/suggestions?
P.S: I took the liberty to open this PR since it's been a while since that issue was reported, but if the volunteer who volunteered to fix this already had done some work on it that can be merged soon, I will gladly close this one.