Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ImportError when pyexiv2 is not installed #2732

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion superdesk/media/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from typing import BinaryIO, Dict, List, Literal, Mapping, TypedDict, Union

from pyexiv2 import convert_xmp_to_iptc
from superdesk.text_utils import decode
from PIL import Image, ExifTags
from PIL import IptcImagePlugin
Expand Down Expand Up @@ -244,6 +243,8 @@ def write_metadata(input: bytes, metadata: PhotoMetadata) -> bytes:
@param file_stream: stream
@param metadata: dict
"""
from pyexiv2 import convert_xmp_to_iptc

xmp = {
"Xmp.dc.description": metadata.get("Description"),
"Xmp.photoshop.CaptionWriter": metadata.get("DescriptionWriter"),
Expand Down
Loading