File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 2727import inspect
2828import threading
2929import time
30+ import traceback
3031from collections .abc import Callable
3132from typing import TYPE_CHECKING , Literal
3233
@@ -273,7 +274,9 @@ def step():
273274 if use_threads .value :
274275 visualization_pause_event .set ()
275276 except Exception as e :
276- print (f"Error in step: { e } " )
277+ debug = input (f"Error in step: { e } . Press 'e' for full traceback " )
278+ if debug == "e" :
279+ traceback .print_exc ()
277280 return
278281
279282 def visualization_task ():
@@ -284,7 +287,11 @@ def visualization_task():
284287 visualization_pause_event .clear ()
285288 force_update ()
286289 except Exception as e :
287- print (f"Error in visualization_task: { e } " )
290+ debug = print (
291+ f"Error in visualization_task: { e } . Press 'e' for full traceback "
292+ )
293+ if debug == "e" :
294+ traceback .print_exc ()
288295
289296 solara .lab .use_task (
290297 step , dependencies = [playing .value , running .value ], prefer_threaded = True
You can’t perform that action at this time.
0 commit comments