From 0d7684a5b4b421f427558aa4bdeff1857d359afa Mon Sep 17 00:00:00 2001 From: Ricky O'Steen <39831871+rosteen@users.noreply.github.com> Date: Mon, 8 Jul 2024 16:35:42 -0400 Subject: [PATCH] Fix Cubeviz movie export (#2942) * Remove line relating to Path, filename now normalized to str * Add resolve() call to filename normalization, changelog --- CHANGES.rst | 2 ++ jdaviz/configs/default/plugins/export/export.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 82a92af199..122fd1461c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -193,6 +193,8 @@ Bug Fixes Cubeviz ^^^^^^^ +- Fixed a bug with filename handling for movie exports. [#2942] + Imviz ^^^^^ diff --git a/jdaviz/configs/default/plugins/export/export.py b/jdaviz/configs/default/plugins/export/export.py index 292c5af2b5..f6db90b635 100644 --- a/jdaviz/configs/default/plugins/export/export.py +++ b/jdaviz/configs/default/plugins/export/export.py @@ -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}") @@ -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()