[mythtv-users] Cleanup recordings not in database
Ramon Hofer
ramonhofer at bluewin.ch
Fri Jun 24 12:29:53 UTC 2011
On 06/24/2011 02:02 PM, Nick Morrott wrote:
> On 24 June 2011 11:45, Ramon Hofer<ramonhofer at bluewin.ch> wrote:
>> On 06/23/2011 06:44 PM, Michael T. Dean wrote:
>>> On 06/23/2011 06:38 AM, Ramon Hofer wrote:
>>>> On 06/14/2011 06:57 PM, Chris Kapp wrote:
>>>>> Recently I had a hard drive crash that left records in the database
>>>>> without files and files without database records (I managed to get
>>>>> some of the files backed up before I completely lost the drive). I
>>>>> found this script worked well:
>>>>>
>>>>> http://www.mythtv.org/wiki/Find_orphans.py
>>>>>
>>>> I wanted to test the script as well but I got the following error:
>>>>
>>>> Traceback (most recent call last):
>>>> File "/home/hoferr/bin/find_orphans.py", line 3, in<module>
>>>> from MythTV import MythDB, MythBE, Recorded
>>>> ImportError: No module named MythTV
>>>>
>>>>
>>>> How can I add these modules?
>>> Do you have the MythTV Python bindings installed? If you're compiling
>>> yourself, check the output of mythtv's configure command to find out
>>> (and to find out why not, if it says no).
>>>
>> Thanks for your reply.
>>
>> I use debian and mythtv package from it's multimedia repos.
>> I have installed the package python-mythtv and now I get this error:
>>
>> Traceback (most recent call last):
>> File "/home/hoferr/bin/find_orphans.py", line 3, in<module>
>> from MythTV import MythDB, MythBE, Recorded
>> 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
>>
>> What else do I have to install?
> Ramon,
>
> As Jonatan replied, you're probably missing python-lxml.
>
> How did you install MythTV from the Debian Multimedia repo in the
> first place? Checking the site it lists python-lxml as a dependency
> for mythtv-frontend, which itself is a dependency of the mythtv
> meta-package which is used to install MythTV.
>
> Cheers,
> Nick
>
Hm, it lists the orphaned recordings but it can't delete them:
...
The following recordings will be deleted
media-server: About
Schmidt
1041_20110521212300.mpg
media-server: About
Schmidt
1041_20110521212600.mpg
media-server: About
Schmidt
1041_20110521213700.mpg
media-server: About
Schmidt
1041_20110521214600.mpg
media-server: About
Schmidt
1041_20110521215400.mpg
media-server: Disney Zack & Cody an Bord - [The Suite Life on Deck]
Verliebt in Rom 1052_20110613200939.mpg
media-server: Formel 1: Siegerehrung und
Highlights 1047_20110522154500.mpg
media-server: Giacobbo/Müller - Late Service
Public 1049_20110523035700.mpg
media-server: Helden der Wissenschaft - Energie ohne
Ende? 1037_20110521210000.mpg
media-server: Helden der Wissenschaft - Energie ohne
Ende? 1037_20110521212300.mpg
media-server: Helden der Wissenschaft - Energie ohne
Ende? 1037_20110521212600.mpg
media-server: Helden der Wissenschaft - Energie ohne
Ende? 1037_20110521213700.mpg
media-server: Helden der Wissenschaft - Energie ohne
Ende? 1037_20110521214600.mpg
media-server: Helden der Wissenschaft - Energie ohne
Ende? 1037_20110521215400.mpg
media-server: Tatort - Nasse Sachen -
MDR 1049_20110613200732.mpg
Count: 15
Are you sure you want to continue?
> yes
Traceback (most recent call last):
File "/home/hoferr/bin/find_orphans.py", line 230, in <module>
main()
File "/home/hoferr/bin/find_orphans.py", line 214, in main
opt[1](opt[2])
File "/home/hoferr/bin/find_orphans.py", line 135, in delete_recs
except MythError:
NameError: global name 'MythError' is not defined
What else do I need?
Cheers
Ramon
More information about the mythtv-users
mailing list