Skip to content

Commit

Permalink
Merge pull request #115 from ttngu207/dev_prairieview_multipagetif
Browse files Browse the repository at this point in the history
fix: additional safeguard to close the file and delete the tffl object
  • Loading branch information
kushalbakshi authored Jun 28, 2024
2 parents eff0d7b + 02962d3 commit e025b29
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 e025b29

Please sign in to comment.