<br><br><div class="gmail_quote">On Sun, Jan 22, 2012 at 5:59 PM, Michael Watson <span dir="ltr"><<a href="mailto:michael@thewatsonfamily.id.au">michael@thewatsonfamily.id.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 23/01/2012 8:11 AM, Tom Hayward wrote:<br>
> On Sun, Jan 22, 2012 at 09:54, Matt Emmott<<a href="mailto:memmott@gmail.com">memmott@gmail.com</a>> wrote:<br>
>> 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.<br>
> Try this script:<br>
> <a href="http://www.mythtv.org/wiki/Find_orphans.py" target="_blank">http://www.mythtv.org/wiki/Find_orphans.py</a><br>
><br>
> I've only used it to remove orphaned files, but it also supports<br>
> finding and removing orphaned db entries.<br>
><br>
><br>
> Tom<br>
> _______________________________________________<br>
> mythtv-users mailing list<br>
> <a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
> <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
><br>
<br>
</div></div>Yes, the find_orphans.py script works really well, can also removes<br>
thumbnail images, orphaned DB entries, orphaned files, and unknown files<br>
located in your storage folders.<br>
<span class="HOEnZb"></span></blockquote><div><br>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:<br>
<br>matt@magicbe:/usr/share/doc/mythtv-backend/contrib/maintenance$ ./find_orphans.py <br>Traceback (most recent call last):<br> File "./find_orphans.py", line 3, in <module><br> from MythTV import MythDB, MythBE, Recorded, MythError<br>
File "/usr/lib/pymodules/python2.6/MythTV/__init__.py", line 55, in <module><br> exec(import26)<br> File "<string>", line 5, in <module><br> File "<string>", line 7, in <module><br>
File "/usr/lib/pymodules/python2.6/MythTV/connections.py", line 18, in <module><br> import lxml.etree as etree<br>ImportError: No module named lxml.etree<br><br>I tried running it with sudo but received the same result. Do I need to pass any type of connection parameters? <br>
</div></div>