[mythtvnz] tv_grab_nz-py

Hadley Rich mythtvnz@lists.linuxnut.co.nz
Sat, 7 Jul 2007 09:40:13 +1200


On Sat, 07 Jul 2007 00:55:28 Nick Rout wrote:
> Hads, I must be thick, but can you give me a quick pointer to why this
> happens?
>
> nick@sf ~/tmp $ ./tv_grab_nz-py
> Traceback (most recent call last):
>   File "./tv_grab_nz-py", line 28, in ?
>     log.critical('ElementTree is required and is not found')
> NameError: name 'log' is not defined
>
>
> Looks like I am missing something, but then you'd think it would fail on
> an import statement or something (see I know THAT much about python LOL).

Oops, sorry. You are right that you are missing something. I forgot to mention 
that the grabber requires elementtree. It's included in Python as of 2.5 but 
if you've got an older version you'll need the external package 
(python-elementtree on Debian based systems).

The reason it's not failing on the import is that I put a 'try' clause around 
the import which allows you to catch errors. The problem is I then tried to 
log the error before setting up the logging system.

I've made a minor update and uploaded it. Cheers for bringing it to my 
attention.

> Moreover can you tell me why it is i am trying this at 1.00 am?

That I can't tell you :)

> Good night.
>
> Nick.
>


-- 
http://nicegear.co.nz
New Zealand's VoIP Supplier