X-devonthink-item link from PDF Expert (with page number)

You’re trying to access an empty list somewhere. Perhaps you can run the code in script editor to get a better trace.

You have done the same for lsof ?

(specifying its full path – here /usr/sbin/lsof but may be elsewhere on other systems)

1 Like

Have tried, but with the same issue.

I encountered an issue on macOS Sonoma with this AppleScript:

Execute an AppleScript failed with script error: text-script:815:885: execution error: iconv: iconv_open(UTF8-MAC, ): Invalid argument (1)

The script worked well prior to Sonoma. Can you help to diagnose the issue? Thanks so much.

That looks like a broken iconv. Ca you run the command in terminal?

@chrillek Thanks for your reminding.

Have tried the command in Terminal, it reported the same error message:

$ iconv -t UTF8-MAC <<<$

iconv: iconv_open(UTF8-MAC, ): Invalid argument

Changing to this one fix the issue:

iconv -t UTF-8 <<<$

That might fix the issue that you call iconv with a coding that it does not (no longer?) supports. But it does not really help if you have UTF8-MAC encoded data, as Apple in its infinite wisdom decided to use decomposed characters (which no one else does). So, running iconv with -t UTF8 might give different and unexpected results from running it with -t UTF8-MAC. You might want to check that out.

1 Like