Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

automator The action “Run Shell Script” encountered an error.

Hi all,
I've created an automator action to automatically organize my TV shows. The bulk of the service is written in python, and this script works perfectly when invoked from the command line with the directories as arguments.

However, whenever I run it via the right click action in Finder I receive the error "The action “Run Shell Script” encountered an error." Errors aren't an issue, I just need to know WHERE the log is for this error so I can correct it.

I've looked everywhere in all the logs that appear in the console application, and it doesn't appear to actually be logging the error. Where can I get the logging information for error that has occurred?

Thanks,
Todd

MacBook Pro, Mac OS X (10.5.2)

Posted on Nov 1, 2010 1:16 AM

Reply
3 replies

Nov 1, 2010 3:51 AM in response to tnine

Unless you added any logging items to your script, I don't think you'll find anything.
However, that sounds like you are referencing items that only exist in the Automator context. Once it is run stand-alone, it no longer has the Automator shell around it.

You can step through the program in Automator. If it is a Service that acts on Files and Folder, you'll have to add a Get Specified Finder Items as the first step temporarily. I haven't used python, but when an Applescript is there, when you get to the Applescript action in Automator, you can click the "play" button and it gives you more information on what fails than just stepping into the action.

Another guess is that it might not be receiving the same type of object in the workflow that you are passing in the shell. Is it a Run Shell Script action? If so, how are you passing the items: stdin or arguments? How does your script reference them?

Nov 1, 2010 1:07 PM in response to Barney-15E

Hey Barney,
My first step is simply to get the selected finder items, then pass them as arguments to my python script. All selected finder items are sent as arguments to my script. What's even more frustrating is everything works as it should, then I receive the error after my script has completed executing.

automator The action “Run Shell Script” encountered an error.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.