Replies: 1 comment
-
I just ran into the same issue and it was incredibly frustrating to debug. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
Typer seems to be capturing
EOFError
and consequently code that raises anEOFError
on its own doesn't print a traceback, just the "Aborted" message.The problem seems to be these lines: https://github.com/tiangolo/typer/blob/f83c66d539b95d00de74e7de6a14b5c53ae0bfe6/typer/core.py#L227-L229
As soon as you realize that is typer that shallows the exception, it is not hard to find a workaround. For example you can capture the
EOFError
and raise a different exception:Nevertheless, it would be nice if
EOFError
could be handled normally.Question, is it truly necessary to bundle
EOFError
withKeyboardException
?Operating System
Linux
Operating System Details
No response
Typer Version
0.9.0
Python Version
3.11
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions