Lightroom (SDK) 4.3RC1: catalog:batchGetRawMetadata( photosAndVideos, nil ) -- error

  • 3
  • Problem
  • Updated 4 years ago
  • Solved
This code was working, up through Lr4.2:

catalog:batchGetRawMetadata( union ) -- nil should mean: all metadata.
(note: union is a valid array of LrPhoto objects).

but in Lr4.3RC1, that code results in an error: bad param #1 to ipairs - expected table, but is nil... - or something very close to that.

In Lr4.3RC1, I'm having to specify all data of interest, e.g.
catalog:batchGetRawMetadata( union, { 'dateTimeOriginal', 'isVirtualCopy' } )

Note: batchGetFormattedMetadata does *not* have the same problem, i.e. this code does not cause error:

catalog:batchGetFormattedMetadata( union ) -- works.

Adobe: I hope you can fix prior to final release.

Thanks,
Rob
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes

Posted 6 years ago

  • 3
Photo of John R. Ellis

John R. Ellis, Champion

  • 3589 Posts
  • 928 Reply Likes
I encountered this same bug with one of my plugins. I hope that this can be fixed in the final release, since there are likely a number of plugins that will break. In addition, the SDK documentation is incomplete, so the only way of discovering the fields that are actually supported is by passing "nil".
Photo of Matt Dawson

Matt Dawson

  • 8 Posts
  • 2 Reply Likes
I can also reproduce this issue.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3589 Posts
  • 928 Reply Likes
Rob wrote, "Note: batchGetFormattedMetadata does *not* have the same problem".

Hmm, just now catalog:batchGetFormattedMetadata (photos, nil) failed with the same error message.

But photo:getFormattedMetadata (nil) and photo:getRawMetadata (nil) still work.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes
It may be photo/data dependent. Sounds like formatted version needs to be fixed too.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes
Fixed in Lr5b - thank you Adobe!
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes
Still working @Lr5.6 - unless John or Matt objects, I think this can be marked "fixed".