From 71e779086b5c1ca6a2d0327eab8ab9c7d7e4e00a Mon Sep 17 00:00:00 2001 From: "Lumberbot (aka Jack)" <39504233+meeseeksmachine@users.noreply.github.com> Date: Mon, 8 Jul 2024 23:54:46 +0200 Subject: [PATCH] Backport PR #2942: Fix Cubeviz movie export (#2943) Co-authored-by: Ricky O'Steen <39831871+rosteen@users.noreply.github.com> --- 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 5865105f88..a93e1a86ba 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,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 73978196d1..eeba93203e 100644 --- a/jdaviz/configs/default/plugins/export/export.py +++ b/jdaviz/configs/default/plugins/export/export.py @@ -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}") @@ -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()