Closed janpeterd closed 4 months ago
Thanks for reporting. Do you experience the issue with other images of these formats too? Do you mind sharing those two images?
Yes using the metadata
command crashes the program on all SVG
and avif
images
This is the image that produced the first error.
(github doesnt allow me to upload .avif
files)
But I don't think that it is file specific, since it happens on all files of these types.
I tested other filetypes and so far only these 2 cause a crash.
Thanks for reporting! I can definitely reproduce this with pyexiv2 and a random svg I had lying around.
@jcjgraf seems like changing the constructor of the corresponding metadata plugin to
class MetadataPyexiv2(metadata.MetadataPlugin):
"""Provides metadata support based on pyexiv2."""
def __init__(self, path: str) -> None:
self._path = path
try:
self._metadata = pyexiv2.ImageMetadata(path)
self._metadata.read()
except FileNotFoundError:
_logger.debug("File %s not found", path)
self._metadata = None
except OSError as e:
_logger.warning(str(e))
self._metadata = None
does the trick. I find the choice of OSError
by pyexiv2 very questionable, but do you think we should go with this? I could commit and push in this case.
Thanks for looking into it. I never run into this issue as I am using a different metadata backend. This fix makes sense to me :+1:
When I press
i
keybind to display metadata ofsvg
the program crashes and produces this error:I get the same error with
avif
files:I installed the
vimiv-qt-git
package from the AUR.This is my config it should be almost default but it might help: