Python Script in Automator

So I wrote a python script to automatically remove torrents from transmission using transmissionrpc. If I run the script manually in terminal using 'python /pathname/tc.py' where pathname is the path to the file, it works fine. However, I want to set it up as a folder action in automator. I added a Run Shell Script action to my workflow with /bin/bash as the shell and Pass input set to stdin. I put the same command in but when I run the workflow, I receive the following error:

Run Shell Script failed - 1 error
Traceback (most recent call last):

As far as I can tell from scouring the web it has to do with the Run Shell Script action's shell not having access to the same things as the default terminal shell. Unfortunately I have no idea how to fix this...
Any advice would be awesome. Thanks :slight_smile:

You have to use the full path of your python compiler. For example /usr/bin/python or you can add the shebang line in you python script #!/usr/bin/python

---------- Post updated at 12:27 AM ---------- Previous update was at 12:25 AM ----------

Here is an example I did using shell script in automator. Running Windows Programs By Double Clicking on it On Mac OS X - YouTube