Skip to content

Commit baa9a6d

Browse files
committed
Use NoColor Ipython formatted stacktrace.
1 parent cc62bb8 commit baa9a6d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

dash/_jupyter.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -448,13 +448,12 @@ def _wrap_errors(error):
448448
original_formatargvalues = inspect.formatargvalues
449449
inspect.formatargvalues = _custom_formatargvalues
450450
try:
451-
# Use IPython traceback formatting to build colored ANSI traceback
452-
# string
451+
# Use IPython traceback formatting to build the traceback string.
453452
ostream = io.StringIO()
454453
ipytb = FormattedTB(
455454
tb_offset=skip,
456455
mode="Verbose",
457-
color_scheme="Linux",
456+
color_scheme="NoColor",
458457
include_vars=True,
459458
ostream=ostream,
460459
)
@@ -463,13 +462,12 @@ def _wrap_errors(error):
463462
# Restore formatargvalues
464463
inspect.formatargvalues = original_formatargvalues
465464

466-
# Print colored ANSI representation if requested
467-
ansi_stacktrace = ostream.getvalue()
465+
stacktrace = ostream.getvalue()
468466

469467
if self.inline_exceptions:
470-
print(ansi_stacktrace)
468+
print(stacktrace)
471469

472-
return ansi_stacktrace, 500
470+
return stacktrace, 500
473471

474472
@property
475473
def active(self):

0 commit comments

Comments
 (0)