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

wrong error message? #2350

Closed
paolobenve opened this issue Sep 10, 2022 · 1 comment · Fixed by #2375
Closed

wrong error message? #2350

paolobenve opened this issue Sep 10, 2022 · 1 comment · Fixed by #2375
Assignees
Milestone

Comments

@paolobenve
Copy link

I have a python app that uses GExiv2 to add gps info to the images.

It modifies the image with teself.exif.set_gps_info(self.longitude, self.latitude, self.altitude)

self.exif[IPTC + 'City'] = self.names[0] or ''
self.exif[IPTC + 'ProvinceState'] = self.names[1] or ''
self.exif[IPTC + 'CountryName'] = self.names[2] or ''
self.exif['Iptc.Envelope.CharacterSet'] = '\x1b%G'

then it saves the file.

When trying to write a CR3 raw image I get the error "Setting Image comment in BMFF images is not supported".

However, the image hasn't any comment changed.

I'd expect a "Setting metadata in BMFF images is not supported" error message.

@postscript-dev
Copy link
Collaborator

@paolobenve:

I'd expect a "Setting metadata in BMFF images is not supported" error message.

You are correct, the error message is wrong. Currently we are throwing a kerInvalidSettingForImage which has an error message of

N_("Setting %1 in %2 images is not supported"), // kerInvalidSettingForImage %1=metadata type, %2=image format

Instead this should be a kerWritingImageFormatUnsupported id which has an error message of

N_("Writing to %1 images is not supported"), // kerWritingImageFormatUnsupported %1=image format

I will try and find time during the week to work on this. Once the fix for the main branch has been merged, I will add it to the 0.27-maintenance branch and then this issue can close.

Thanks for reporting this.

postscript-dev added a commit that referenced this issue Oct 18, 2022
- This is a partial backport of #2364. The new exceptions in `::setExifData()`/`::setIptcData()`/`::setXmpData()` are not included as they could change the control flow of the maintenance branch for the user.
- Conan change is a backport of #2361
- Closes #2350
@kmilos kmilos added this to the v0.27.6 milestone Oct 19, 2022
antermin pushed a commit to antermin/exiv2 that referenced this issue Mar 16, 2023
- This is a partial backport of Exiv2#2364. The new exceptions in `::setExifData()`/`::setIptcData()`/`::setXmpData()` are not included as they could change the control flow of the maintenance branch for the user.
- Conan change is a backport of Exiv2#2361
- Closes Exiv2#2350
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants