Skip to content

Commit 57e52a4

Browse files
author
OutlyingWest
committed
disabling animations hint added
1 parent 04bc5a9 commit 57e52a4

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

src/scorep_jupyter/kernel.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,10 +586,26 @@ async def scorep_execute(
586586
allow_stdin=allow_stdin,
587587
cell_id=cell_id,
588588
)
589+
590+
is_spinner_enabled = str(os.getenv(
591+
"SCOREP_JUPYTER_DISABLE_PROCESSING_ANIMATIONS"
592+
)).lower() not in ["true", "1", "t"]
593+
if is_spinner_enabled:
594+
scorep_process_error_hint = (
595+
"\nHint: If the animation spinner is active, "
596+
"runtime errors in Score-P cells might be hidden.\n"
597+
"Try disabling the spinner with "
598+
"%env SCOREP_JUPYTER_DISABLE_PROCESSING_ANIMATIONS=1 "
599+
"and/or check the log file for details."
600+
)
601+
else:
602+
scorep_process_error_hint = ""
603+
589604
if reply_status_update["status"] != "ok":
590605
self.log_error(
591606
KernelErrorCode.PERSISTENCE_LOAD_FAIL,
592607
direction="Score-P -> Jupyter",
608+
optional_hint = scorep_process_error_hint
593609
)
594610
self.pershelper.postprocess()
595611
return reply_status_update
@@ -602,6 +618,8 @@ async def scorep_execute(
602618
self.log_error(
603619
KernelErrorCode.PERSISTENCE_LOAD_FAIL,
604620
direction="Score-P -> Jupyter",
621+
optional_hint = scorep_process_error_hint
622+
605623
)
606624
return self.standard_reply()
607625

src/scorep_jupyter/kernel_messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class KernelErrorCode(Enum):
2929
),
3030
KernelErrorCode.PERSISTENCE_LOAD_FAIL: (
3131
"[mode: {mode}] Failed to load persistence "
32-
"({direction}, marshaller: {marshaller})."
32+
"({direction}, marshaller: {marshaller}). {optional_hint}"
3333
),
3434
KernelErrorCode.SCOREP_SUBPROCESS_FAIL: (
3535
"[mode: {mode}] Subprocess terminated unexpectedly. "

0 commit comments

Comments
 (0)