GPS location scripting broken with iPhoto 9.0.1
The latest update to iPhoto '11 is supposed to fix some upgrading and library conversion errors, but the latest version also seems to break some AppleScript functions that some third-party programs may rely on.
Starting with iPhoto 8.0.3, Apple implemented support for editing the geographical positioning tags for photos using AppleScript. The idea in part was to encourage developers of third-party programs like HoudahGeo to edit the photo information in the iPhoto library without directly accessing the library itself.
This implementation has worked for a number of iPhoto revisions, but in the latest update from Apple it appears that setting GPS coordinates with AppleScripts is not working properly. If you run an AppleScript similar to the following that uses the "set latitude" or "set longitude" commands, then you may get an error claiming the "class is not key value coding-compliant for the key gpsLatitude."
tell application "iPhoto"
set myPhotos to (every photo whose image path is "/Users/pierre/Pictures/iPhoto
Library/Masters/2010/Oct 11, 2010/IMG_0119.JPG")
repeat with currentPhoto in myPhotos
set latitude of currentPhoto to 50.11
set longitude of currentPhoto to 6.68
The commands did work in iPhoto '11 version 9.0.0, so this is likely a small oversight by Apple where the function for setting the photo's latitude is not being handled properly by the latest update. Apple quickly rushed out the 9.0.1 update to address importing and upgrading issues some people were having, many of which revolved around extra features such as calendars and potentially some GPS-related content in their libraries.
The API for implementing the AppleScript commands in third-party programs is still available as it always has been, but in implementing the changes to correct the importing problems with the initial iPhoto '11 release, Apple may not have fully tested this API.
We hope Apple will issue an update for this issue soon, because a few third-party programs like HoudahGeo rely on the AppleScript interface for iPhoto to implement their functions.