[mythtv-users] Error running find_orphans.py
Michael T. Dean
mtdean at thirdcontact.com
Tue Sep 1 11:24:10 UTC 2015
On 08/30/2015 02:02 PM, Dave Badia wrote:
> Hi -
>
> I did a fresh download of this script from the wiki at
> https://www.mythtv.org/wiki/Find_orphans.py but getting the
> following error:
>
> Any thoughts?
>
> python2 find_orphans.py
> Traceback (most recent call last):
> File "find_orphans.py", line 221, in <module>
> DB = MythDB()
> File "/usr/local/lib/python2.7/dist-packages/MythTV/database.py",
> line 1271, in __init__
> elif self._testconfig(tmpconfig):
> File "/usr/local/lib/python2.7/dist-packages/MythTV/database.py",
> line 1301, in _testconfig
> self._schema_name)
> File "/usr/local/lib/python2.7/dist-packages/MythTV/database.py",
> line 1324, in _check_schema
> sver = int(cursor.fetchone()[0])
> File
> "/usr/local/lib/python2.7/dist-packages/MythTV/_conn_mysqldb.py", line
> 107, in __exit__
> self.commit()
> File
> "/usr/local/lib/python2.7/dist-packages/MythTV/_conn_mysqldb.py", line
> 98, in commit
> def commit(self): self.connection.commit()
> AttributeError: 'weakref' object has no attribute 'commit'
I'm pretty sure you're using a newer version of Python oursql or MySQLdb
than is supported. There's some tiny change required to make it work
with the newer (and it should work with the older even after the
change), but I have no clue what that change is--I can't find the
reference I saw that showed the required change (it was a bug
report/patch somewhere, but I think it was on one of the distro trackers
and it doesn't seem to have been reported to our Trac). I think it's
something about changing the commit() call to be on the connection or
something like that.
Mike
More information about the mythtv-users
mailing list