lgaleana commited on
Commit
541b9a9
1 Parent(s): cc70e87

Exception printing

Browse files
Files changed (2) hide show
  1. actions.py +1 -1
  2. components.py +1 -1
actions.py CHANGED
@@ -90,7 +90,7 @@ def execute_task(task_id: int, active_index: int, error_value, *args):
90
  except Exception as e:
91
  import traceback
92
 
93
- print(traceback.format_tb(e.__traceback__))
94
  outputs[active_index] = "ERROR"
95
  return outputs + [
96
  gr.HighlightedText.update(
 
90
  except Exception as e:
91
  import traceback
92
 
93
+ traceback.print_exc()
94
  outputs[active_index] = "ERROR"
95
  return outputs + [
96
  gr.HighlightedText.update(
components.py CHANGED
@@ -230,7 +230,7 @@ class CodeTask(TaskComponent):
230
  except Exception as e:
231
  import traceback
232
 
233
- print(traceback.format_exc())
234
  error_message = gr.HighlightedText.update(
235
  value=[(str(e), "ERROR")], visible=True
236
  )
 
230
  except Exception as e:
231
  import traceback
232
 
233
+ traceback.print_exc()
234
  error_message = gr.HighlightedText.update(
235
  value=[(str(e), "ERROR")], visible=True
236
  )