Skip to content

Commit

Permalink
improving COMBINE error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Mar 21, 2021
1 parent 17beacd commit a06b28f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions biosimulators_utils/combine/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ def sed_doc_executer(doc, working_dir, base_out_path, rel_out_path=None,
if plot_formats is None:
plot_formats = [PlotFormat(format_value) for format_value in config.PLOT_FORMATS]

archive = CombineArchive()
archive_tmp_dir = None
try:
# create temporary directory to unpack archive
archive_tmp_dir = tempfile.mkdtemp()
Expand All @@ -140,9 +138,15 @@ def sed_doc_executer(doc, working_dir, base_out_path, rel_out_path=None,
print(get_summary_sedml_contents(archive, archive_tmp_dir))

except Exception as exception:
print('Simulation experiments could not be read from the COMBINE archive')

archive = CombineArchive()
archive_tmp_dir = None

log = init_combine_archive_log(archive, archive_tmp_dir,
supported_features=supported_features,
logged_features=logged_features)

log.status = Status.FAILED
log.out_dir = out_dir
log.exception = exception
Expand Down

0 comments on commit a06b28f

Please sign in to comment.