Show Ticket

Status: closed, reported by shanehoenke on 2009-09-18 (other)

osascript error loading Adobe Unit Types.osax

I just installed the demo version of TextMate and tried it out for the first time.  When running any applescript code I get the following error.   If these errors wouldn't show up I would buy the program.

2009-09-17 21:42:16.420 osascript[63848:307] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types:  dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found.  Did find:

/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper

osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.

Note added by Allan Odgaard on 2009-09-18 07:40:49

The error is with /Library/ScriptingAdditions/Adobe Unit Types.osax — this is something Photoshop (or similar) installed, and it was installed for 32 bit, but I am assuming you have upgraded to Snow Leopard and is running a 64 bit version of osascript.

The workaround is to just delete this scripting extension.

Note added by H.P. Logsdon on 2009-09-23 04:25:54

I've noticed that Photoshop (and any other scriptable Adobe application for that matter) can "re-install" this extension if it notices it is missing. Helpful if you delete it outright, but annoying if you think you have fixed the problem, yet it magically appears later.

A better solution than deleting it might be to add a symlink to /dev/null

cd '/Library/ScriptingAdditions/' \
sudo tar cjf Adobe\ Unit\ Types.tar.bz2 Adobe\ Unit\ Types.osax \
sudo rm -rf 'Adobe\ Unit\ Types.osax' && sudo ln -s /dev/null ./Adobe\ Unit\ Types.osax

This will obviously change into the scripting additions directory, archive the extension, remove the original, and create a symlink to /dev/null. It does require authentication with an administrators password.