fix accepted_formats
in spectacle-screenshots
This commit is contained in:
parent
712c2c2163
commit
f265752a8a
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue