Skip to main content

Hi , i tried to run a python file through a script , but i receive errors from that file .



BUT when i run it from terminal everything works fine .



Do you have any idea what the problem may be?

Could you post the script you are using? (Use the script formatting)



Also, Python is a script that can run on Mac OS X natively so you don't need to run it from a script unless there was a reason you were calling it that way.


I need to run a .py to make some changes to the notification center .



-> #!/bin/sh



-> #!/usr/bin/env python



-> python /Documents/NCutil.py --alert-style alerts com.eukaryote.RSS


I run python scripts from Casper quite regularly. You don't want two #! lines. Start your script with only "#!/usr/bin/python", which instructs it to use Python as the interpreter.



I guess another way to say it would be - don't call your python script from a Bash script within Casper. Just put the python directly into Casper.


Reply