next-playground commited on
Commit
8205d13
1 Parent(s): b863621

Update flask_api_full_song.py

Browse files
Files changed (1) hide show
  1. flask_api_full_song.py +1 -0
flask_api_full_song.py CHANGED
@@ -116,6 +116,7 @@ def wav2wav():
116
  tasks[task_id] = {"status": "processing"}
117
  audio_result = requests.get(request.args.get('audio_path'))
118
  if audio_result.status_code != 200:
 
119
  raise Exception("无效的 URL")
120
  with open("/tmp/" + request.args.get("audio_path", "").split('/')[-1], 'wb') as f:
121
  f.write(audio_result.content)
 
116
  tasks[task_id] = {"status": "processing"}
117
  audio_result = requests.get(request.args.get('audio_path'))
118
  if audio_result.status_code != 200:
119
+ print("audio result status code as ", audio_result.status_code, " because of ", str(audio_result.content))
120
  raise Exception("无效的 URL")
121
  with open("/tmp/" + request.args.get("audio_path", "").split('/')[-1], 'wb') as f:
122
  f.write(audio_result.content)