Skip to main content
Participating Frequently
July 20, 2008
Question

XMP Exception: LFA_Open: FSPathMakeRef failure

  • July 20, 2008
  • 4 replies
  • 1626 views
I get this error on the XMPFile call in the following script from ESTK2 on Mac OSX:

> #target bridge

>if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");

>var psdFile = new File("...picture.psd");

>if (psdFile.exists) {

>var xmpFile = new XMPFile(psdFile.fullName, XMPConst.FILE_PHOTOSHOP, XMPConst.OPEN_ONLY_XMP); // Blows up here

>var xmp = xmpFile.getXMP();

>}

"...picture.psd" is a Photoshop file that exists and has XMP data.

Any clues?
This topic has been closed for replies.

4 replies

Participating Frequently
July 29, 2008
Many thanks David

Don't know why but I had been trying "fsname" instead of "fsName" which didn't work of course so I ended up using "fullName".

Oh well! All's well that ends well!
dfranzen_camera_raw
Adobe Employee
Adobe Employee
July 29, 2008
You might have better luck passing File.fsName instead of File.fullName.

-DAvid
Participating Frequently
July 22, 2008
In case anyone stumbles across this trying to solve the same problem:
>new XMPFile(psdFile.fullName.replace("~", $.getenv("HOME")),...

is better.
Participating Frequently
July 21, 2008
Hmmm...

It seems that the File constructor replaces "/Users/username" at the beginning of paths with "~" and XMPFile does not like paths that begin with "~". Changing the XMPFile call seems to fix it:

> var xmpFile = new XMPFile(psdFile.fullName.replace("~", "/Users/username"), XMPConst.FILE_PHOTOSHOP, XMPConst.OPEN_ONLY_XMP);

... not nice!!!!