Skip to content

Commit

Permalink
try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
bw4sz committed Mar 20, 2020
1 parent d161375 commit 3790d11
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Zooniverse/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ def main(path, everglades_watch, save_dir="/orange/ewhite/everglades/Zooniverse/
print("Running files:{}".format(paths))
for path in paths:
#Run .tif
saved_file = main(path, everglades_watch)

#Confirm it exists and write to the csv file
assert os.path.exists(saved_file)
uploaded = uploaded.path.append(pd.Series({"path":saved_file}),ignore_index=True)

try:
saved_file = main(path, everglades_watch)
#Confirm it exists and write to the csv file
assert os.path.exists(saved_file)
uploaded = uploaded.path.append(pd.Series({"path":saved_file}),ignore_index=True)
except Exception as e:
print("{} failed with exception".format(path))

#Overwrite uploaded manifest
uploaded.to_csv("uploaded.csv")

0 comments on commit 3790d11

Please sign in to comment.