[mythtv-users] Lost a disk - How to remove missing shows from database?

Matt Emmott memmott at gmail.com
Mon Jan 23 01:44:58 UTC 2012


On Sun, Jan 22, 2012 at 5:59 PM, Michael Watson <
michael at thewatsonfamily.id.au> wrote:

> On 23/01/2012 8:11 AM, Tom Hayward wrote:
> > On Sun, Jan 22, 2012 at 09:54, Matt Emmott<memmott at gmail.com>  wrote:
> >> One of the disks in my storage group went bye-bye, and now there are
> hundreds of orphaned listings in my slave BE. I've tried removing the files
> using MythWeb, but Mythweb for me has always been historically slow, and
> attempting to select and delete more than one showing at a time results in
> a timeout. I was wondering if there's a SQL query I could run to delete all
> shows whose file size is less than 1 byte or something. I've already run a
> backup of the database.
> > Try this script:
> > http://www.mythtv.org/wiki/Find_orphans.py
> >
> > I've only used it to remove orphaned files, but it also supports
> > finding and removing orphaned db entries.
> >
> >
> > Tom
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://www.mythtv.org/mailman/listinfo/mythtv-users
> >
>
> Yes, the find_orphans.py script works really well, can also removes
> thumbnail images, orphaned DB entries, orphaned files, and unknown files
> located in your storage folders.
>

Thanks, I had forgotten about this script. I'm having a problem though - I
pasted the contents of that script into find_orphans.py and chmod +x'ed it,
but when I run it I get the following:

matt at magicbe:/usr/share/doc/mythtv-backend/contrib/maintenance$
./find_orphans.py
Traceback (most recent call last):
  File "./find_orphans.py", line 3, in <module>
    from MythTV import MythDB, MythBE, Recorded, MythError
  File "/usr/lib/pymodules/python2.6/MythTV/__init__.py", line 55, in
<module>
    exec(import26)
  File "<string>", line 5, in <module>
  File "<string>", line 7, in <module>
  File "/usr/lib/pymodules/python2.6/MythTV/connections.py", line 18, in
<module>
    import lxml.etree as etree
ImportError: No module named lxml.etree

I tried running it with sudo but received the same result. Do I need to
pass any type of connection parameters?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20120122/c3fb5695/attachment.html 


More information about the mythtv-users mailing list