Commit 6ad80580 authored by Mikaël Salson's avatar Mikaël Salson
Browse files On Vidjil error, result file won't be generated

parent 69888527
......@@ -65,8 +65,11 @@ def segment_sequences(sequences):
## execute la commande vidjil
with open(result_path, 'r') as myfile:
text_result =
if os.path.isfile(result_path):
with open(result_path, 'r') as myfile:
text_result =
return response.json({'error': 'Error while processing the file'})
return response.json(gluon.contrib.simplejson.loads(text_result))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment