Replies: 1 comment
-
I found a way to get a bit more information about the nested exceptions, but I'm not sure how to interpret it: Exception has occurred: SystemExit (note: full exception trace is shown but execution is paused at: ) During handling of the above exception, another exception occurred: File "C:\Users\jphda\miniconda3\envs\Kasa\Lib\site-packages\click\core.py", line 673, in fail |
Beta Was this translation helpful? Give feedback.
-
I am using Click with Python 3.10.4 on Windows with VS Code. I have this simple test program:
If I run this with "python test.py monitor" it exits with an error saying missing IP argument, which is what I'd expect.
When I run it in the debugger (debugpy) within VS Code with the same command line, it comes up with the following message:
And points to the last line of code (cli())
I'm fairly new to Python and trying to understand if this is expected. It appears to be saying that while processing SystemExit exception another exception occurred.
I'm not sure if this is a feature of Click, a bug in my code or just expected behaviour.
I'd like it to just finish without an uncaught exception as this doesn't seem to give me any useful information, or the ability to diagnnose the problem. Is there a way to handle this more gracefully?
Beta Was this translation helpful? Give feedback.
All reactions