This shortcut cannot be run because this action is a scripting action error


I’ve created a shortcut which dumps some of the HomeKit data to external python script’s standard input. It works when I run it in Shortcuts app and using my Mac; it works also when I run shortcut from terminal using shortcut run dump-homekit in terminal; but the moment I lock my computer, this action causes this error. Correct permissions are set.

Is there a workaround? Yes, I know I can “append to file” using shortcuts, but by doing so, iCloud Drive becomes somewhat slow, because it needs to sync file every 5 minutes :frowning: