Unhelpful click errors in test suite due to fallback main() function. #2316
Unanswered
bnavigator
asked this question in
Potential Issue
Replies: 42 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
"Bug reports" such as #2243 / #2270 are not very indicative because the displayed error message is not instructive at all:
I got the same error in my own packaging efforts and could not make any sense out of it until I discovered, that the code in init.py
httpx/httpx/__init__.py
Lines 47 to 59 in 3aa4410
totally hides the real problem.
After replacing the try:, except: Block with a plain import of main, the resulting backtrace showed me that there was a packaging error in rich:
I suspect the original reporter had a similar problem, as this was indeed some problem of rich: Textualize/rich#2386
The fallback should be made more robust for a proper error message, when the Click Test runner tries to run the command.
Beta Was this translation helpful? Give feedback.
All reactions