You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docstring of stackprinter.format states, that there is a keyword argument named suppressed_exception_types.
Using that parameter results in a stackprinter crash with the following error message:
┆ Stackprinter failed:
┆ File "/.../lib/python3.11/site-packages/stackprinter/formatting.py", line 176, in format_exc_info
┆ whole_stack = format_stack(frameinfos, style=style,
┆ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
┆ TypeError: format_stack() got an unexpected keyword argument 'suppressed_exception_types'
┆
┆ So here is your original traceback at least:
┆
┆ Traceback (most recent call last):
┆ File "/...
stackprinter.format uses stackprinter.formatting.format_exc_info internally, which has a keyword arg suppressed_exceptions.
Using suppressed_exceptions instead of suppressed_exception_types solved the TypeError.
Here is the working Formatter Class:
class VerboseExceptionFormatter(logging.Formatter):
def formatException(self, exc_info):
msg = stackprinter.format(
exc_info,
...
suppressed_exceptions=[KeyboardInterrupt, SystemExit],
...
)
return "\n".join(" ┆ " + "%s"%(line) for line in msg.split("\n"))
The text was updated successfully, but these errors were encountered:
First of all: thanks for this great package!
The docstring of
stackprinter.format
states, that there is a keyword argument namedsuppressed_exception_types
.Using that parameter results in a stackprinter crash with the following error message:
stackprinter.format
usesstackprinter.formatting.format_exc_info
internally, which has a keyword argsuppressed_exceptions
.Using
suppressed_exceptions
instead ofsuppressed_exception_types
solved theTypeError
.Here is the working Formatter Class:
The text was updated successfully, but these errors were encountered: