I have the feeling that your script is picking up that file (which clearly doesn't have a paste
attribute.
Your Python script should begin with #!/usr/bin/env python3
, a shebang line that instructs the system to execute the file with the Python interpreter. The entire script should be placed within the 'Execute a Shell Script' action in Keyboard Maestro.
If you're encountering issues while running a specific shell script, it could be due to Keyboard Maestro utilizing a different Python environment than your terminal. To resolve this, run echo $PATH
in your terminal. This will output the path that your terminal is using.
Next, in Keyboard Maestro, create a variable named ENV_PATH
(if it doesn't already exist) and set its value to the output from the echo $PATH
command. This will ensure that Keyboard Maestro and your terminal are using the same Python environment.
If your script doesn't happen to rely on any installed modules, should work just fine using the correct shebang line inside an 'Execute a Shell Script' action.
Feel free to ask for more clarification.