Author Topic: Error reading caption from photo  (Read 14623 times)

Offline ralbrux

  • Newcomer
  • *
  • Posts: 12
    • View Profile
Error reading caption from photo
« on: January 16, 2019, 06:49:05 AM »
Hi,

I have PM v 5.0, build 19728 running on my PC under Windows 10 Pro v 1803.

I have recently downloaded PM as a replacement for my old DAM, IDImager (IDI) Pro (now discontinued).    I used IDI to write metadata to my images.  What I see in PM is that a fair number of these images brought over from IDI, not all, but some in a manner for which I cannot discern any pattern, when in a contact sheet I click on the "i" icon of a selected image to see the IPTC info for that image I get the error message "Error reading caption from photo".  Then clicking on "OK" give access to the IPTC info window.

This does not appear, then, to be a critical error but it is annoying.

I did a search on the forum, and the only thing I saw was a post from 2017 about a similar issue for a person which occurred with some Canon raw formats but not for others.  That post did not contain any thing that looks like a solution for my issue.  I shoot Nikon raw (nef) images.

I attach a jpeg screen shot showing this issue when I am cycling through images in a contact sheet with IPTC information window open and using the arrows in the right hand pane to move through the contact sheet until the error occurs.

What mystifies me a bit is that the "Description/Caption" field in "Image Content" section of the IPTC information window is empty.

In advance, thanks for any info you can give me.

Richard

 





Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Error reading caption from photo
« Reply #1 on: January 16, 2019, 07:11:24 AM »
Can you provide me a sample image that reproduce the problem along with any XMP sidecar file that goes with it?  Without a sample to analyze, I can't tell what's going wrong.

-Kirk

Offline ralbrux

  • Newcomer
  • *
  • Posts: 12
    • View Profile
Re: Error reading caption from photo
« Reply #2 on: January 16, 2019, 08:07:11 AM »
Kirk,

Thanks for your prompt reply.

I am at a bit of a loss to satisfy your request.   The images which cause the problem are uncompressed nef files mostly weighing around 25 -35 MB and so too large to attach to my reply.   Using Nikon Capture I tried converting one to a high quality jpeg but that jpeq no longer causes the error message.  Then in PM I tried using the "Save as" choice when right clicking on an image and choosing to save as a jpeg.   That produces an additional jepg image in PM seen in the contact folder as one (nef + jpeg).  Opening the IPTC info for this double image no longer causes the error to happen.  But if I delete the jpeg image (which is superfluous for me) and leave only the original nef image, the problem is there once again.

How to send you a nef file?

After sending my first post I was checking things out a bit more.   Even stranger is that I have stumbled across a series of nef files in which the first one has the caption "Storm breaking over El Capitan" and does not produce the error.   But the following 6 photos in the series with the same caption do whilst the 7th in the series with same caption doesn't.

I don't know if it is of any significance, but just in case, I used exiftool to look the metadata of one nef file to which IDImager wrote the caption to 3 fields:  Exif IFD0 ImageDescription, XMP-dc Description and finally IPTC Caption-Abstract.

Richard

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Error reading caption from photo
« Reply #3 on: January 16, 2019, 08:16:53 AM »
Richard,

If you have a service such as DropBox, you can put it there and share it with me (it will provide you a link), or if you know how to upload to an FTP server, I can give you the details for our FTP server and you can upload the image directly.

Please let me know how you want to proceed.

-Kirk

Offline ralbrux

  • Newcomer
  • *
  • Posts: 12
    • View Profile
Re: Error reading caption from photo
« Reply #4 on: January 16, 2019, 08:22:31 AM »
Kirk,

It's been a while, but having using File Zilla a few times in the past, I should be able to ftp you the file.

Richard

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Error reading caption from photo
« Reply #5 on: January 16, 2019, 08:45:24 AM »
It's been a while, but having using File Zilla a few times in the past, I should be able to ftp you the file.

OK, I will contact you with a personal message with the server details.

-Kirk

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Error reading caption from photo
« Reply #6 on: January 16, 2019, 09:16:21 AM »
Richard,

I got your sample image.  I can't reproduce the problem with my settings.  Can you post a screenshot of your IPTC/XMP settings in the Preferences dialog?  Use the 'Attachments and other options' link when you're composing your reply to this message and there you'll be able to upload your JPEG format screenshot.

Thanks,

-Kirk

Offline ralbrux

  • Newcomer
  • *
  • Posts: 12
    • View Profile
Re: Error reading caption from photo
« Reply #7 on: January 16, 2019, 09:53:46 AM »
Kirk,

As per your request I attach a jpeg screenshot of my IPTC/XMP setting in PM.

On the other hand, I think I made a mistake on the nef file I FTP-ed to you.   As I mentioned I was looking at a series of 7 or 8 shots of the same scene, some of which showed the problem and others not.

So just now I have FTPed you another nef file which I have carefully checked to make sure it shows the problem here for me.  This one is 20091004_ls_117.NEF.

I hope that this helps.

Richard

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Error reading caption from photo
« Reply #8 on: January 16, 2019, 09:58:53 AM »
Richard,

So just now I have FTPed you another nef file which I have carefully checked to make sure it shows the problem here for me.  This one is 20091004_ls_117.NEF.

Great, thanks.  I'm able to reproduce the problem on my end now.

-Kirk

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Error reading caption from photo
« Reply #9 on: January 16, 2019, 10:44:05 AM »
Richard,

The file that gives an error has malformed XMP metadata embedded within it.  We use Adobe's XMP Toolkit to parse and create XMP metadata.  It's the industry standard.

I extracted the metadata and found that it is rather unusually formatted.  It uses two styles of XMP: compact and verbose which usually aren't mixed.  Creators of XMP metadata usually choose either of the two formats (compact is generally preferred because it is both smaller and quicker to parse) but not both.

The specific error from the XMP Toolkit is "error #202 (Invalid child of resource property element)"

-Kirk

Offline ralbrux

  • Newcomer
  • *
  • Posts: 12
    • View Profile
Re: Error reading caption from photo
« Reply #10 on: January 16, 2019, 12:25:47 PM »
Kirk,

Thanks for the info.

Trying to extract and manipulate XMP metadata is somewhat above my pay grade.

Do you think that there is any way I can clear out the corrupted XMP metadata in the problem nef files using PM metadata editing tools?

I ran a find using the troublesome description field "Storm breaking over El Captian" for that series of shots.   It found only the nef files in that series not showing the problem.   I have tried using the IPTC Stationery Pad to clear the description field in problem filess but that didn't work.

Is there any other way.

Richard


Offline ralbrux

  • Newcomer
  • *
  • Posts: 12
    • View Profile
Re: Error reading caption from photo
« Reply #11 on: January 16, 2019, 12:43:49 PM »
Kirk,

Just to let you know I think I have a work around.

On a problem nef file I brought up the IPTC info window and simply typed in an extra word at the end of description and then saved that.  After that the problem was cleared and I deleted the entire modified description and then retyped it in.  The problem no longer occurs for that nef.

The only problem remaining is that of the 4,329 nef files I can't easily know which ones are have corrupted.   It would be a time consuming task to check one by one.

Do you think that there is any batch method for finding them?

Richard

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Error reading caption from photo
« Reply #12 on: January 16, 2019, 01:32:52 PM »
Richard,

Just to let you know I think I have a work around.

On a problem nef file I brought up the IPTC info window and simply typed in an extra word at the end of description and then saved that.  After that the problem was cleared and I deleted the entire modified description and then retyped it in.  The problem no longer occurs for that nef.

The only problem remaining is that of the 4,329 nef files I can't easily know which ones are have corrupted.   It would be a time consuming task to check one by one.

Do you think that there is any batch method for finding them?

No, but there is a batch way of fixing them.  Select them all and bring up the IPTC Stationery Pad from the Image menu.  Find some field that you never use like Transmission Reference or Edit Status.  Put a word like "temp" in the field.  The checkbox to the left of the field will become set.  Make sure no other checkboxes are set.  Then Apply to Selected.  All of the image should now be "repaired".  Repeat the process but remove "temp" from your chosen field such that it is blank.  Apply again.  The "temp" text should now be removed.

HTH,

-Kirk

Offline ralbrux

  • Newcomer
  • *
  • Posts: 12
    • View Profile
Re: Error reading caption from photo
« Reply #13 on: January 18, 2019, 06:14:36 AM »
Kirk,

It's taken a

Offline ralbrux

  • Newcomer
  • *
  • Posts: 12
    • View Profile
Re: Error reading caption from photo
« Reply #14 on: January 18, 2019, 06:44:50 AM »
Kirk,

Well hitting the wrong key & sending a reply too soon is not a good start.

It's taken a little time to get back after your suggestion on fixing my problem.

It didn't work for me.   It may be that being new to PM, I went too fast and did something untoward.  Things got pretty messy and worse rather than better after attempting a batch job such as you suggested.  Fortunately I'm a belt & suspenders guy, so I had made a copy of all my nef files before doing the batch job on them.

The long and the short of it, is that I took the copies made before doing a batch job and then overwrote the ones modified in the batch job.  I then uninstalled and reinstalled PM to get back to something normal.

There is clearly something wrong with some of the metadata in my some of my files, be they jpeg, tif or nef.  In the sample I send you you found corruption. Looks like I'm in metadata hell or since not all is bad, at least in metadata purgatory.

I started many years back with, I think, iView Media Pro and after that used IDImager Pro (IDI).  In between I experimented a little with Lightroom's limited DAM capabilites.  Most of my metadata writing was done with IDI.   It may be that IDI had a peculiar way of writing metadata: all was written directly to the image files, no sidecars.  Now more recently I have been looking for a new DAM and have been testing a few: XNView MP, digiKam, iMatch and PM.  It may be that in so doing I added more problems than those already there.

I think I will bite the bullet and go through my image files individually to weed out the caption reading error since, among other things, I need to redo all of my keywording.  IDI has a catalog and it is best to use it to do keywording.  This keywording appears not to be easily available to other DAMS - I saw this in experimenting with digiKam, iMatch and now with PM.   So there's not much for it, I need to do it all over again.

So thanks for taking time to give me some tips and assistance.

FYI, you may already be aware of another problem which I encountered but didn't bring up - characters not liked by PM, specifically the ampersand (&).   Before posting here, I was googling and came across the following post going all the way back to 2010:

https://discussions.apple.com/thread/2648876

I had a nef which would cause PM to crash when trying to open the Info dialogue and in the caption was an ampersand.   I managed to clear the caption of the ampersand and everything was fine.   Today I found another file with an & in the caption and cleared it as well.   Also today I found other files which caused PM to crash but with no ampersand.  After clearing the caption and then rewriting it, all was well.

So as I see it, I'm in a bit of metadata hell and I just have clean things up.

So, again, thanks for helping.  I think we can consider this problem closed.

BTW, of all soft I been testing I find PM to be the best for my needs.

Best regards,
Richard