Skip to content

Commit

Permalink
fix: additional safeguard to close the file and delete the tffl object
Browse files Browse the repository at this point in the history
  • Loading branch information
ttngu207 committed Jun 28, 2024
1 parent dbec434 commit 315c19a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions element_interface/prairie_view_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ def write_single_bigtiff(
"'fps'": self.meta["frame_rate"],
},
)
# additional safeguard to close the file and delete the object
# in the attempt to prevent error: `not a TIFF file b''`
tffl.close()
del tffl
except Exception as e:
raise Exception(f"Error in processing tiff file {input_file}: {e}")

Expand Down

0 comments on commit 315c19a

Please sign in to comment.