Skip to content

Commit

Permalink
Backport PR #2942: Fix Cubeviz movie export (#2943)
Browse files Browse the repository at this point in the history
Co-authored-by: Ricky O'Steen <39831871+rosteen@users.noreply.github.com>
  • Loading branch information
meeseeksmachine and rosteen authored Jul 8, 2024
1 parent 69eb20c commit 71e7790
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Bug Fixes
Cubeviz
^^^^^^^

- Fixed a bug with filename handling for movie exports. [#2942]

Imviz
^^^^^

Expand Down
2 changes: 1 addition & 1 deletion jdaviz/configs/default/plugins/export/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ def _normalize_filename(self, filename=None, filetype=None, overwrite=False):
filename += f".{filetype}"
filename = Path(filename).expanduser()

filename = filename.resolve()
filepath = filename.parent
if filepath and not filepath.is_dir():
raise ValueError(f"Invalid path={filepath}")
Expand Down Expand Up @@ -673,7 +674,6 @@ def save_movie(self, viewer, filename, filetype, i_start=None, i_end=None, fps=N
if i_end <= i_start:
raise ValueError(f"No frames to write: i_start={i_start}, i_end={i_end}")

filename = str(filename.resolve())
threading.Thread(
target=lambda: self._save_movie(viewer, i_start, i_end, fps, filename, rm_temp_files)
).start()
Expand Down

0 comments on commit 71e7790

Please sign in to comment.