|
|
|
Script Problem
When I tried to run the script I got
Traceback (most recent call last): File "./rip.py", line 6, in ? from subprocess import Popen ImportError: No module named subprocess I am a newbie with scripting. I am running Mac OS X 10.4.9 I placed HandBrakeCLI in /usr/local/bin I ran the OS X installer for Python 2.5.1. It created /Applications/MacPython 2.5 which contains Python Launcher.app I copied the script to TextWrangler 2.2.1 and saved it as rip.py in a directory /Applications/A_Rip_Stoff In Terminal I ran chmod +x rip.py I then ran ./rip.py and got the above msg. What am I doing wrong? Al Maloney
Script Problem
Well you need to install the subprocess module, it is not installed by default.
Script Problem
Install subprocess module ???
I guess I am out of my league here. I'll put myself on hold for a while. I'm afraid I might screw up things in my ignorance. Thanks anyway Al
Script Problem
Dont give up so quickly.
By installing from this link:
python
you will get the full python install which will install correctly the subprocess module.
Script Problem
The issue is that the script is still running python 2.3. The subprocess module is part of python 2.4+, hence the dependence.
After you install python 2.4 or 2.5, you will need to change the link to python in /usr/bin from the terminal type "ls -la | grep python", you will see what I mean. To fix this just do the following: sudo mv python python.old sudo ln -s /Library/Frameworks/Python.framework/Versions/Current/bin/python python sudo rm python.old Once you do this, the script should work. If you don't want to muck with the links in /usr/bin, you can replace the first line of the script from: #!/usr/bin/python to: #!/Library/Frameworks/Python.framework/Versions/Current/bin/python Hope that helps.
Script Problem
I was able to get the script to start by making sure #!/usr/bin/python was on the first line of the script. (When I pasted it from the hint, it wasn't the first line).
Then it reads the DVD for a minute and outputs: ........................................nripping: chapter 0 (0s) .nyou totally ripped! (0:1:40 total time) No output file is created, i.e. nothing appears to have happened. Is there a simple way to see diagnostics of this script? So far, it seems no one has had success making it run.
Script Problem
Hmmm.
Well you can run HandBrakeCLI stand alone, and see if it works. From the output you show, it appears that the scanning did not return anything. Try: HandBrakeCLI /Volumes/your_dvd -t 0 You should see a bunch of output. The script parses this output to return the longest title.
Script Problem
Still not getting it... here is my command and output:
HandBrakeCLI -i /Volumes/WW_S3_D4/ -t0 HandBrake 0.8.5b1 (2007042001) - http://handbrake.m0k.org/ 1 CPU detected Opening /Volumes/WW_S3_D4/... Scanning title 1 of 13... Scanning title 2 of 13... Scanning title 3 of 13... Scanning title 7 of 13... Scanning title 8 of 13... Scanning title 9 of 13... Scanning title 10 of 13... Scanning title 13 of 13... No title found. HandBrake has exited. And when I run the script, I still just get ./scripts/rip.py /Volumes/SHARED/shared/Ripped/ .........nripping: chapter 0 (0s) .nyou totally ripped! (0:1:9 total time) sh: line 1: growlnotify: command not found
Script Problem
"No title found" sounds like HandBrake is having trouble reading the DVD properly. Try it with a different DVD.
|
SearchFrom our Sponsor...What's New:Hints4 new Hints in the last 24 hoursComments last 2 days
Links last 2 weeksNo recent new linksWhat's New in the Forums?
The Editor's Corner...Here are some of my (robg) other projects...
Hints by TopicNews from Macworld
The macosxhints PollWhat version of OS X are you running as your main OS?
Other polls | 11,320 votes | 42 comments
|
|
Copyright © 2009 Mac Publishing LLC (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Powered by Geeklog Created this page in 0.04 seconds |
|