[mythtv-users] ttvdb.py errors preventing metadata lookup

Larry K lunchtimelarry at gmail.com
Sat Jan 4 00:51:07 UTC 2014


On Fri, Jul 12, 2013 at 7:12 PM, Beny Spensieri Jr <benyjr at yahoo.ca> wrote:

> >From: Raymond Wagner <raymond at wagnerrp.com>
>
> >To: Discussion about MythTV <mythtv-users at mythtv.org>
> >Sent: Thursday, July 11, 2013 7:57:16 PM
> >Subject: Re: [mythtv-users] ttvdb.py errors preventing metadata lookup
> >
> >
> >On 7/11/2013 7:51 PM, Beny Spensieri Jr wrote:
> >> Hi everyone,
> >>
> >> I am running MythTV 0.26 from Atrpms on CentOS 6.4
> >>
> >> Metadata lookup kept failing and I narrowed it down to ttvdb.py always
> >> coughing up the following error:
> >>
> >> [mythtv at localhost Television]$
> >> /usr/share/mythtv/metadata/Television/ttvdb.py -l en -M Mad Men 6 1
> >> /usr/share/mythtv/metadata/Television/ttvdb.py: line 38: __title__:
> >> command not found
> >> /usr/share/mythtv/metadata/Television/ttvdb.py: line 202: syntax error
> >> near unexpected token `)'
> >> /usr/share/mythtv/metadata/Television/ttvdb.py: line 202: `(Return
> >> thetvdb.com's top rated poster, banner and fan art for a TV Series)'
> >>
> >> [mythtv at localhost Television]$
> >> /usr/share/mythtv/metadata/Television/ttvdb.py -u
> >> /usr/share/mythtv/metadata/Television/ttvdb.py: line 38: __title__:
> >> command not found
> >> /usr/share/mythtv/metadata/Television/ttvdb.py: line 202: syntax error
> >> near unexpected token `)'
> >> /usr/share/mythtv/metadata/Television/ttvdb.py: line 202: `(Return
> >> thetvdb.com's top rated poster, banner and fan art for a TV Series)'
> >>
> >> Does anyone know how to fix this?  I can't find anyone else having this
> >> error anywhere.
> >
> >If I had to guess, I would say you're somehow managing to run it using
> >some interpreter other than Python.  What does the first line in the
> >file say?
> >_______________________________________________
> >mythtv-users mailing list
> >mythtv-users at mythtv.org
> >http://www.mythtv.org/mailman/listinfo/mythtv-users
> >
>
>
> Hi Ray,
>
> Yes! That was the problem.
>
> This is the first three lines of my ttvdb.py said:
>
> #!
> # -*- coding: UTF-8 -*-
> # ----------------------
> # Name: ttvdb.py
>
>
>
> This is what it should look like:
>
> #!/usr/bin/env python
> # -*- coding: UTF-8 -*-
> # ----------------------
> # Name: ttvdb.py
>
> Once I changed the first line, it started working with MythTV.
>
> I think I should feed this back to ATRPMS as soon as possible.
>
>
I forgot to point out that pretty much all the mythtv python scripts have
this issue.  To make matters simpler, I have a one-liner that fixes the
issue:

find /usr/share/mythtv  -name '*.py' -exec sed -i
'1s|^.*$|#!/usr/bin/python|' {} \;

Improvements appreciated.


> Thanks for your help.
>
> Beny
>
> "If you are not part of the solution,
>     you are part of the precipitate."
>
> http://dontcrossthestreams.blogspot.com
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20140103/00887590/attachment.html>


More information about the mythtv-users mailing list