Skip to content

Commit

Permalink
Fix Cubeviz movie export (#2942)
Browse files Browse the repository at this point in the history
* Remove line relating to Path, filename now normalized to str

* Add resolve() call to filename normalization, changelog
  • Loading branch information
rosteen authored Jul 8, 2024
1 parent 2b78234 commit 0d7684a
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 @@ -193,6 +193,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 @@ -357,6 +357,7 @@ def _normalize_filename(self, filename=None, filetype=None, overwrite=False, def
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 @@ -693,7 +694,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 0d7684a

Please sign in to comment.