Make that 4. After between 4 and six times of the script failing on the first item, it'll give me on partial success, returning the properties of the first item but failing on the second. After that it'll go back to failing on the first item again for a few runs. I can repepat this fairly reliably.
tell application "Photos"
count every selection of current application
--> 2
get selection
--> {media item id "8tn%t6PeQea3qtn%nHLB7g", media item id "eodXL5x1SZ+duHSYbCb9tg"}
get properties of media item id "8tn%t6PeQea3qtn%nHLB7g"
--> error number -10000
Result:
error "Photos got an error: AppleEvent handler failed." number -10000
tell application "Photos"
count every selection of current application
--> 2
get selection
--> {media item id "8tn%t6PeQea3qtn%nHLB7g", media item id "eodXL5x1SZ+duHSYbCb9tg"}
get properties of media item id "8tn%t6PeQea3qtn%nHLB7g"
--> {favorite:false, id:"8tn%t6PeQea3qtn%nHLB7g", class:media item, filename:"2012-08-14 16.06.28.jpg", width:1552, location:{missing value, missing value}, keywords:missing value, date:date "Tuesday, 14 August 2012 16:06:28", height:2592, description:missing value, altitude:missing value, name:"Shanes script-2"}
get selection
--> {media item id "8tn%t6PeQea3qtn%nHLB7g", media item id "eodXL5x1SZ+duHSYbCb9tg"}
get properties of media item id "eodXL5x1SZ+duHSYbCb9tg"
--> error number -10000
Result:
error "Photos got an error: AppleEvent handler failed." number -10000