[mythtv-users] User Job to rip subtitles from each program
Jeremy Jones
jeremy.dwain.jones at gmail.com
Fri Feb 3 23:35:32 UTC 2012
On Fri, Feb 3, 2012 at 4:33 PM, David Crawford
<davidcrawford83 at gmail.com> wrote:
>
>
> On 3 February 2012 22:19, David Crawford <davidcrawford83 at gmail.com> wrote:
>>
>>
>>
>> On 3 February 2012 22:17, Raymond Wagner <raymond at wagnerrp.com> wrote:
>>>
>>> On 2/3/2012 17:12, David Crawford wrote:
>>> > bash: syntax error near unexpected token '1010'
>>>
Did you have the < character in front of the 1010? It would probably
help if you were to actually post your entire command line instead of
descriptions of what you did.
>>> If you are getting anything "bash", it means that your "hashbang" is not
>>> configured properly, and your system is instead trying to run the script
>>> directly in whatever shell you are currently running (which seems to be
>>> Bash).
Maybe. You know better than I do, but what if the bash error is in
his command line and it never gets to the python script
I did this in a bash shell just to test:
jeremy at mythbox2011-03-25:~$ find_orphans.py <1010>
bash: syntax error near unexpected token `1010'
Just to further drive home the point of the <brackets>:
Those are indicators to you that the word or input that goes there is
something you should fill in, and *****does not***** include the
actual beginning "<" or the ending ">".
>>> http://en.wikipedia.org/wiki/Shebang_%28Unix%29#Examples
>>>
>>> In the case of the jobqueue, it currently passes everything through the
>>> Bourne shell (/bin/sh), but the end result would be the same.
>>> _______________________________________________
>>> mythtv-users mailing list
>>> mythtv-users at mythtv.org
>>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>>
>>
>> Wouldnt that prevent the other script from not working also?
>
> When running with " " for "<Chanid>"and "<starttime>"
>
> I instead get
>
> chanid, starttime = sys.arg[1:3]
> ValueError: need more than 1 value to unpack
>
>
This is good, it means the python interpreter is running the code
here, but you only passed one value and it needed three. The first
value was the python script name which was passed to python as:
sys.argv[0]
the second:
sys.argv[1]
which is stored in the variable: chanid
the third is:
sys.argv[2]
which is stored in the variable: starttime
Jeremy
More information about the mythtv-users
mailing list