eloicito333 commited on
Commit
6e81e30
·
1 Parent(s): c3fc22d

added detailed exception traceback printing in EndpointHandler

Browse files
Files changed (1) hide show
  1. handler.py +4 -2
handler.py CHANGED
@@ -16,6 +16,7 @@ import base64
16
  import io
17
  import numpy as np
18
  from huggingface_hub import hf_hub_download
 
19
 
20
  class EndpointHandler:
21
  def __init__(self, path=""):
@@ -87,7 +88,6 @@ class EndpointHandler:
87
  cross_fade_duration=cross_fade_duration,
88
  speed=speed,
89
  show_info=print,
90
- progress=None,
91
  )
92
 
93
  if remove_silence:
@@ -108,7 +108,9 @@ class EndpointHandler:
108
  }
109
 
110
  except Exception as e:
111
- print(e)
 
 
112
  return {
113
  "success": False,
114
  "error": f"{type(e).__name__}: {str(e)}"
 
16
  import io
17
  import numpy as np
18
  from huggingface_hub import hf_hub_download
19
+ import traceback
20
 
21
  class EndpointHandler:
22
  def __init__(self, path=""):
 
88
  cross_fade_duration=cross_fade_duration,
89
  speed=speed,
90
  show_info=print,
 
91
  )
92
 
93
  if remove_silence:
 
108
  }
109
 
110
  except Exception as e:
111
+ print("==== Exception Traceback ====")
112
+ traceback.print_exc()
113
+ print("==== End Traceback ====")
114
  return {
115
  "success": False,
116
  "error": f"{type(e).__name__}: {str(e)}"