Closed bestlem closed 2 years ago
I don't understand how to set up a xontrib copy and get that to load. As this code is just one file I copied it to my startup files and altered. and made these alterations
@@ -44,7 +44,7 @@
backtrace._flush=__flush
-def _print_exception(msg=None, exc_info=None):
+def _print_exception(msg=None):
"""
Override xonsh.tools.print_exception.
"""
@@ -63,12 +63,8 @@
with open(log_file, 'a') as f:
traceback.print_exc(file=f)
- # is no exec_info() triple is given, use the exception beeing handled at the moment
- if exc_info is None:
- exc_info = sys.exc_info()
-
#backtrace_hock
- tpe, v, tb = exc_info
+ tpe, v, tb = sys.exc_info()
if $XONSH_READABLE_TRACEBACK:
backtrace.hook(
tb=tb,
I was having trouble running into the exact same error. I will take a look.
@bestlem Thx. fixed. Please update 0.4.0 : https://pypi.org/project/xontrib-readable-traceback/0.4.0/
In xonsh.tools the signature of print_exception has been changed, adding a exc_info keyword.
Some error routes will use this extra parameter and this kills xonsh.
I can't reproduce with xonsh --no-rc but with my set up just type an unknown environment variable e.g. example with python 3.11 but 3.9 and 3.10 do the same.