Exit(-1) Cannot run script

Come up with a useful post-processing script? Share it here!
Post Reply
iveoles
Newbie
Newbie
Posts: 8
Joined: October 17th, 2011, 3:43 pm

Exit(-1) Cannot run script

Post by iveoles »

I'm having a problem running this script from Sab. If I manually add the details and run the file it works and converts just fine. Executing from Sab get's me the below error though.

Exit(-1) Cannot run script /Users/iveoles/Documents/Scripts/AppleTV

I've looked around for advice but haven't found anything that worked. Already tried

sudo chmod +x & sudo chmod 777 but no luck.

I've attached a copy of the project, there's the script on it's own, then the project as a whole.

https://www.dropbox.com/sh/kt3tsvwcs4yvsdr/clKJY7mi9U

I've been working on the AppleTV converting, and when it's an MKV to convert the video at really low quality but merge the AAC audio into an untouched video M4V. The SublerCLI doesn't convert audio yet so this is the best workaround.

I've also added some statements near the top to rename shows that don't match TVDB. This is because iDentify wasn't finding 'The Office Us' but would find 'The Office (US)'. Using it for a couple others too.

Full credit to the original script writer who I believe is a few post below.

Thanks to anyone who can get this working
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: Exit(-1) Cannot run script

Post by sander »

can you run any other, basic script?
iveoles
Newbie
Newbie
Posts: 8
Joined: October 17th, 2011, 3:43 pm

Re: Exit(-1) Cannot run script

Post by iveoles »

Hmmm I copied the file, then stripped everything out of it until it was just two echo's and that worked fine.

I assume I have a flaw somewhere then? The script does run fine manually though, is there something that would execute normally but trip Sab up?
iveoles
Newbie
Newbie
Posts: 8
Joined: October 17th, 2011, 3:43 pm

Re: Exit(-1) Cannot run script

Post by iveoles »

Hmm and running it against an MP3 starts the script fine, guess I have some troubleshooting to do. Any pro's see something obvious that I'm missing from Sab?

UPDATE:

I think I've found the solution, for anyone else who comes across this issue. I kept getting the error when running the script because it was downloaded from the internet so I had to add it to the quarantine.

xattr -d -r com.apple.quarantine /Users/iveoles/Documents/Scripts/AppleTV

This command needs to be rerun every time you make an edit to the file.
Post Reply