From f265752a8a9270fbba31c0f03570baa82b460c87 Mon Sep 17 00:00:00 2001 From: cswimr Date: Sun, 2 Feb 2025 18:52:46 -0600 Subject: [PATCH] fix `accepted_formats` in `spectacle-screenshots` --- scripts/py/spectacle-screenshot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/py/spectacle-screenshot.py b/scripts/py/spectacle-screenshot.py index 66a1d20..57bbd9e 100755 --- a/scripts/py/spectacle-screenshot.py +++ b/scripts/py/spectacle-screenshot.py @@ -27,7 +27,9 @@ def spectacle_screenshot( 'File already exists. Please provide a different file path, or use the zipline function to upload the file.\nExample: zipline "{file_path}"' ) - accepted_formats = [str(f) for f in QImageWriter.supportedImageFormats()] + accepted_formats = [ + f.data().decode() for f in QImageWriter.supportedImageFormats() + ] accepted_formats.extend(("webm", "mp4")) print(accepted_formats) if not format: @@ -37,7 +39,7 @@ def spectacle_screenshot( f"Invalid format. Accepted formats are: {', '.join(accepted_formats)}" ) else: - format = f".{format}" + format = f".{str(format)}" if not file_path: use_temp_file = True