Skip to content

Commit

Permalink
Add try again clause
Browse files Browse the repository at this point in the history
  • Loading branch information
adelavega committed Feb 7, 2021
1 parent 67f6b5a commit 3b61487
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion neuroscout/populate/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ def _extract(graphs, stim_object):
if 'GoogleVideoAPIShotDetectionExtractor' in str(ext.__class__):
pliers_stim.filename = str(
Path(pliers_stim.filename).with_suffix('.avi'))
res = graph.transform(pliers_stim, merge=False)[0]
try:
res = graph.transform(pliers_stim, merge=False)[0]
except Exception:
# Try again (may be connection error)
res = graph.transform(pliers_stim, merge=False)[0]
results.append((stim_obj.id, res))
del pliers_stim
return results
Expand Down

0 comments on commit 3b61487

Please sign in to comment.