[mythtvnz] tv_grab_nz-py

Nick Rout mythtvnz@lists.linuxnut.co.nz
Sat, 07 Jul 2007 16:17:59 +1200


Hadley Rich wrote:
> On Sat, 07 Jul 2007 10:35:26 Nick Rout wrote:
>   
>> Thanks, thats installed (very small emerge - 40kb)
>>
>> I have python 2.4.2 and elementtree 1.2.6. I haven't downloaded your
>> latest version.
>>
>> Now I get this:
>>
>> nick@sf ~/tmp $ ./tv_grab_nz-py --configure
>> INFO - Downloading data from epg.pvr.geek.nz...
>> INFO - Done
>> INFO - Parsing channel data...
>> Traceback (most recent call last):
>>   File "./tv_grab_nz-py", line 212, in ?
>>     doc = ElementTree.parse(StringIO(text)).getroot()
>>   File "/usr/lib/python2.4/site-packages/elementtree/ElementTree.py",
>> line 859, in parse
>>     tree.parse(source, parser)
>>   File "/usr/lib/python2.4/site-packages/elementtree/ElementTree.py",
>> line 578, in parse
>>     parser = XMLTreeBuilder()
>>   File "/usr/lib/python2.4/site-packages/elementtree/ElementTree.py",
>> line 1114, in __init__
>>     raise ImportError(
>> ImportError: No module named expat; use SimpleXMLTreeBuilder instead
>>     
>
> Hmm, I guess the Python that you have doesn't include expat which it seems 
> elementtree requires. I'm not sure sorry, seems like it should be a 
> dependency if it's required. In Debian expat is in the main Python package. I 
> don't know Gentoo but can you `$SEARCH_PACKAGES python | grep expat`?
>
> hads
>
>   
I am embarrassed to say that the error was a stray file in my ~/tmp 
directory which was confusing python.

The --config script seems to ask whether I watch Prime 3 times.

Once run, there seems to be a newline missing in the first line:

<tv date="20070707074154 +1200" generator-info-name="epgsnoop/0.15.0" 
generator-info-url="http://nice.net.nz/epgsnoop"><channel 
id="tv2.sky.co.nz"> <-- all one line


- which is probably a point of style only :-)