[mythtv-users] find_orphans.py error
news at siddall.name
Tue Jan 17 18:21:30 UTC 2012
On 01/16/2012 05:44 PM, Raymond Wagner wrote:
> On 1/16/2012 17:27, Jeff Siddall wrote:
>> On 01/16/2012 04:50 PM, Raymond Wagner wrote:
>>> On 1/16/2012 16:46, Jeff Siddall wrote:
>>>> File "/usr/local/bin/find_orphans.py", line 57
>>>> with DB as c:
>>>> SyntaxError: invalid syntax
>>>> This is a CentOS 5.2 system. Any ideas?
>>> Your system is too old to run that script. The 'with' construct was in
>>> staging in Python 2.5, requiring a special future import to make it
>>> work, and was not proper syntax until Python 2.6. CentOS 5 uses Python 2.4.
>> Thanks for the quick reply. I do have python2.6 installed. When I run
>> it with that I now get:
>> python2.6 ./find_orphans.py
>> Traceback (most recent call last):
>> File "./find_orphans.py", line 3, in<module>
>> from MythTV import MythDB, MythBE, Recorded, MythError
>> ImportError: No module named MythTV
>> rpm -ql python-MythTV shows myth python stuff is installed in
> If your Python bindings exist here, they are broken. The version of the
> bindings that ships with 0.24 requires Python 2.5 at minimum. The
> version of bindings that ships with 0.25 requires Python 2.6 at
> minimum. That script does not work with the bindings that ship with
> 0.23 or previous.
Hmmm... well, I guess it is broken then. yum list python-MythTV shows:
So those 2.4 bindings definitely came with the 0.24.
Looks like it will be a major effort to get python 2.6 stuff working in
CentOS 5. Perhaps I will manually try to do this with a mqsql dump from
whatever table(s) list the recordings plus some glue script to try to
find the deltas with what is on the filesystem. Either that or
reinstall that system as something RHEL6 based.
More information about the mythtv-users