Mailing List Archive

HELP: HD died will need to delete all recordings
Damn...one of the drives in my backend died so I'll loose all my recordings.

Is there some shortcut to effectively do a delete and allow re-record
on everything? I have a LOT there and will really need this.

Thanks in advance.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HELP: HD died will need to delete all recordings [ In reply to ]
On Mon, Oct 22, 2018 at 09:15:36PM -0400, Tom Dexter wrote:
> Damn...one of the drives in my backend died so I'll loose all my recordings.
>
> Is there some shortcut to effectively do a delete and allow re-record
> on everything? I have a LOT there and will really need this.
>
> Thanks in advance.

In Watch Recordings, add all recordings to the playlist then choose
delete and allow re-record in the playlist options menu. Note that
will not create new, recording rules for programs that no longer have
rules matching them.

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HELP: HD died will need to delete all recordings [ In reply to ]
On Mon, 22 Oct 2018 21:15:36 -0400, you wrote:

>Damn...one of the drives in my backend died so I'll loose all my recordings.
>
>Is there some shortcut to effectively do a delete and allow re-record
>on everything? I have a LOT there and will really need this.
>
>Thanks in advance.
>
>Tom

Delete yes, re-record no, not that I know of. For deleting recordings
that have missing recording files, use the "find_orphans.py" script:

https://www.mythtv.org/wiki/Find_orphans.py

But if you want to also automate the re-recording of the missing
programmes, do not run find_orphans.py before you have done that, or
the information you need will be gone. What you need is a script that
will look up your database for the names of all the recording files,
then check your storagegroups to see which files it can find and which
ones it can not. Then it would provide a list of all the missing
files, similar to find_orphans.py, and would then work out all the
entries in the oldrecorded database table that would need to be
altered or deleted to get the missing programmes to re-record. I do
not know exactly how the "allow re-record" mechanism works, so it
would be necessary to find that out so what it does can be copied.

All of that is do-able and something I would probably be able to work
out, but it would take a while to write the script and debug it.

Has the drive actually died, or is it just giving problems? If the
latter, you may be able to recover a lot of the recordings before it
actually dies. And do you have smartmontools installed? That gives
you the best chance of getting prior warning of a drive that is going
bad.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HELP: HD died will need to delete all recordings [ In reply to ]
On 10/22/18, David Engel <david@istwok.net> wrote:
> On Mon, Oct 22, 2018 at 09:15:36PM -0400, Tom Dexter wrote:
>> Damn...one of the drives in my backend died so I'll loose all my
>> recordings.
>>
>> Is there some shortcut to effectively do a delete and allow re-record
>> on everything? I have a LOT there and will really need this.
>>
>> Thanks in advance.
>
> In Watch Recordings, add all recordings to the playlist then choose
> delete and allow re-record in the playlist options menu. Note that
> will not create new, recording rules for programs that no longer have
> rules matching them.
>
> David
> --

Thanks everyone for the replies! This one sounds workable.

It also occurred to me that doing this in mythweb manually probably
wouldn't be too tough. That would also allow me to pick and choose
what I actually care about re-recording.

Thanks again!
Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HELP: HD died will need to delete all recordings [ In reply to ]
On 10/22/2018 10:47 PM, Stephen Worthington wrote:
> On Mon, 22 Oct 2018 21:15:36 -0400, you wrote:
>
>> Damn...one of the drives in my backend died so I'll loose all my recordings.
>>
>> Is there some shortcut to effectively do a delete and allow re-record
>> on everything? I have a LOT there and will really need this.
>>
>> Thanks in advance.
>>
>> Tom
> Delete yes, re-record no, not that I know of. For deleting recordings
> that have missing recording files, use the "find_orphans.py" script:
>
> https://www.mythtv.org/wiki/Find_orphans.py

find_orphans.py automatically deletes and _allows_ re-record, but you
are correct that it will not create new rules to record the shows that
are deleted (nor will any other mechanism for deletion). Any existing
rules the cover the shows that get deleted will result in re-recording
of the episodes. However rules that no longer exist (i.e. "this
showing" or "find and record once" or ... rules) will need to be created
again. Generally, though, those one-off rules tend to be for
"opportunistic" recording of something less important, so probably
aren't too much of a concern.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HELP: HD died will need to delete all recordings [ In reply to ]
On 10/23/18, Michael T. Dean <mtdean@thirdcontact.com> wrote:
> On 10/22/2018 10:47 PM, Stephen Worthington wrote:
>> On Mon, 22 Oct 2018 21:15:36 -0400, you wrote:
>>
>>> Damn...one of the drives in my backend died so I'll loose all my
>>> recordings.
>>>
>>> Is there some shortcut to effectively do a delete and allow re-record
>>> on everything? I have a LOT there and will really need this.
>>>
>>> Thanks in advance.
>>>
>>> Tom
>> Delete yes, re-record no, not that I know of. For deleting recordings
>> that have missing recording files, use the "find_orphans.py" script:
>>
>> https://www.mythtv.org/wiki/Find_orphans.py
>
> find_orphans.py automatically deletes and _allows_ re-record, but you
> are correct that it will not create new rules to record the shows that
> are deleted (nor will any other mechanism for deletion). Any existing
> rules the cover the shows that get deleted will result in re-recording
> of the episodes. However rules that no longer exist (i.e. "this
> showing" or "find and record once" or ... rules) will need to be created
> again. Generally, though, those one-off rules tend to be for
> "opportunistic" recording of something less important, so probably
> aren't too much of a concern.
>
> Mike

Thanks for the clarification! Yea, that sounds fine. I'm not looking
to have it re-record anything where we used "record only this showing"
or the like, so that's fine. Thanks again.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HELP: HD died will need to delete all recordings [ In reply to ]
On 10/23/18, Michael T. Dean <mtdean@thirdcontact.com> wrote:
> On 10/22/2018 10:47 PM, Stephen Worthington wrote:
>> On Mon, 22 Oct 2018 21:15:36 -0400, you wrote:
>>
>>> Damn...one of the drives in my backend died so I'll loose all my
>>> recordings.
>>>
>>> Is there some shortcut to effectively do a delete and allow re-record
>>> on everything? I have a LOT there and will really need this.
>>>
>>> Thanks in advance.
>>>
>>> Tom
>> Delete yes, re-record no, not that I know of. For deleting recordings
>> that have missing recording files, use the "find_orphans.py" script:
>>
>> https://www.mythtv.org/wiki/Find_orphans.py
>
> find_orphans.py automatically deletes and _allows_ re-record, but you
> are correct that it will not create new rules to record the shows that
> are deleted (nor will any other mechanism for deletion). Any existing
> rules the cover the shows that get deleted will result in re-recording
> of the episodes. However rules that no longer exist (i.e. "this
> showing" or "find and record once" or ... rules) will need to be created
> again. Generally, though, those one-off rules tend to be for
> "opportunistic" recording of something less important, so probably
> aren't too much of a concern.
>
> Mike

Wow...totally confused. How exactly should I be getting that
find_orphans.py script? I see it's not part of the mythtv distribution
itself, and that link above doesn't have any sort of raw download. I
attempted to copy and paste it into vi from that page (which really
rubbed me the wrong way), which looked ok (and appeared to have the
proper space indenting) but it fails miserably.

Run as root I get this:

./find_orphans.py
Traceback (most recent call last):
File "./find_orphans.py", line 221, in <module>
DB = MythDB()
File "/usr/lib/python2.7/site-packages/MythTV/database.py", line
1264, in __init__
for tmpconfig in dbconfig.test(self.log):
File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 938, in test
for conn in XMLConnection.fromUPNP(5.0):
File "/usr/lib/python2.7/site-packages/MythTV/connections.py", line
607, in fromUPNP
ip, port = reLOC.match(res['location']).group(1,2)
AttributeError: 'NoneType' object has no attribute 'group'

If I attempt that as a non-root user it segfaults. Any suggestions are welcome.

I was actually able to recover most of the recordings we care about
and I wanted to use this to clean up the rest.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HELP: HD died will need to delete all recordings [ In reply to ]
On 10/26/18, Tom Dexter <digitalaudiorock@gmail.com> wrote:
> On 10/23/18, Michael T. Dean <mtdean@thirdcontact.com> wrote:
>> find_orphans.py automatically deletes and _allows_ re-record, but you
>> are correct that it will not create new rules to record the shows that
>> are deleted (nor will any other mechanism for deletion). Any existing
>> rules the cover the shows that get deleted will result in re-recording
>> of the episodes. However rules that no longer exist (i.e. "this
>> showing" or "find and record once" or ... rules) will need to be created
>> again. Generally, though, those one-off rules tend to be for
>> "opportunistic" recording of something less important, so probably
>> aren't too much of a concern.
>>
>> Mike
>
> Wow...totally confused. How exactly should I be getting that
> find_orphans.py script? I see it's not part of the mythtv distribution
> itself, and that link above doesn't have any sort of raw download. I
> attempted to copy and paste it into vi from that page (which really
> rubbed me the wrong way), which looked ok (and appeared to have the
> proper space indenting) but it fails miserably.
>
> Run as root I get this:
>
> ./find_orphans.py
> Traceback (most recent call last):
> File "./find_orphans.py", line 221, in <module>
> DB = MythDB()
> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line
> 1264, in __init__
> for tmpconfig in dbconfig.test(self.log):
> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 938, in
> test
> for conn in XMLConnection.fromUPNP(5.0):
> File "/usr/lib/python2.7/site-packages/MythTV/connections.py", line
> 607, in fromUPNP
> ip, port = reLOC.match(res['location']).group(1,2)
> AttributeError: 'NoneType' object has no attribute 'group'
>
> If I attempt that as a non-root user it segfaults. Any suggestions are
> welcome.
>
> I was actually able to recover most of the recordings we care about
> and I wanted to use this to clean up the rest.
>
> Tom
>

Given how little I actually had to do here I just did this manually in
mythweb...but I'd still love to know what I was doing wrong there if I
ever need this.

Thanks!
Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HELP: HD died will need to delete all recordings [ In reply to ]
On Fri, 26 Oct 2018 13:10:39 -0400, you wrote:

>On 10/26/18, Tom Dexter <digitalaudiorock@gmail.com> wrote:
>> On 10/23/18, Michael T. Dean <mtdean@thirdcontact.com> wrote:
>>> find_orphans.py automatically deletes and _allows_ re-record, but you
>>> are correct that it will not create new rules to record the shows that
>>> are deleted (nor will any other mechanism for deletion). Any existing
>>> rules the cover the shows that get deleted will result in re-recording
>>> of the episodes. However rules that no longer exist (i.e. "this
>>> showing" or "find and record once" or ... rules) will need to be created
>>> again. Generally, though, those one-off rules tend to be for
>>> "opportunistic" recording of something less important, so probably
>>> aren't too much of a concern.
>>>
>>> Mike
>>
>> Wow...totally confused. How exactly should I be getting that
>> find_orphans.py script? I see it's not part of the mythtv distribution
>> itself, and that link above doesn't have any sort of raw download. I
>> attempted to copy and paste it into vi from that page (which really
>> rubbed me the wrong way), which looked ok (and appeared to have the
>> proper space indenting) but it fails miserably.
>>
>> Run as root I get this:
>>
>> ./find_orphans.py
>> Traceback (most recent call last):
>> File "./find_orphans.py", line 221, in <module>
>> DB = MythDB()
>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line
>> 1264, in __init__
>> for tmpconfig in dbconfig.test(self.log):
>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 938, in
>> test
>> for conn in XMLConnection.fromUPNP(5.0):
>> File "/usr/lib/python2.7/site-packages/MythTV/connections.py", line
>> 607, in fromUPNP
>> ip, port = reLOC.match(res['location']).group(1,2)
>> AttributeError: 'NoneType' object has no attribute 'group'
>>
>> If I attempt that as a non-root user it segfaults. Any suggestions are
>> welcome.
>>
>> I was actually able to recover most of the recordings we care about
>> and I wanted to use this to clean up the rest.
>>
>> Tom
>>
>
>Given how little I actually had to do here I just did this manually in
>mythweb...but I'd still love to know what I was doing wrong there if I
>ever need this.
>
>Thanks!
>Tom

In Python the indenting matters, so you may have had a problem with
that. It is difficult to tell. And for Python it is also best to use
UTF-8 (no signature) as the character set for storing files now.
Python code can have UTF-8 characters in it and that can be important.
I have put a copy of my working version on my web server:

http://www.jsw.gen.nz/mythtv/find_orphans.py

You might like to download it and check it against your vi version. I
checked it against the official version today and it is identical,
according to my diff program. And it works for me.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HELP: HD died will need to delete all recordings [ In reply to ]
On 10/27/18, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
> On Fri, 26 Oct 2018 13:10:39 -0400, you wrote:
>
>>On 10/26/18, Tom Dexter <digitalaudiorock@gmail.com> wrote:
>>> On 10/23/18, Michael T. Dean <mtdean@thirdcontact.com> wrote:
>>>> find_orphans.py automatically deletes and _allows_ re-record, but you
>>>> are correct that it will not create new rules to record the shows that
>>>> are deleted (nor will any other mechanism for deletion). Any existing
>>>> rules the cover the shows that get deleted will result in re-recording
>>>> of the episodes. However rules that no longer exist (i.e. "this
>>>> showing" or "find and record once" or ... rules) will need to be
>>>> created
>>>> again. Generally, though, those one-off rules tend to be for
>>>> "opportunistic" recording of something less important, so probably
>>>> aren't too much of a concern.
>>>>
>>>> Mike
>>>
>>> Wow...totally confused. How exactly should I be getting that
>>> find_orphans.py script? I see it's not part of the mythtv distribution
>>> itself, and that link above doesn't have any sort of raw download. I
>>> attempted to copy and paste it into vi from that page (which really
>>> rubbed me the wrong way), which looked ok (and appeared to have the
>>> proper space indenting) but it fails miserably.
>>>
>>> Run as root I get this:
>>>
>>> ./find_orphans.py
>>> Traceback (most recent call last):
>>> File "./find_orphans.py", line 221, in <module>
>>> DB = MythDB()
>>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line
>>> 1264, in __init__
>>> for tmpconfig in dbconfig.test(self.log):
>>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 938,
>>> in
>>> test
>>> for conn in XMLConnection.fromUPNP(5.0):
>>> File "/usr/lib/python2.7/site-packages/MythTV/connections.py", line
>>> 607, in fromUPNP
>>> ip, port = reLOC.match(res['location']).group(1,2)
>>> AttributeError: 'NoneType' object has no attribute 'group'
>>>
>>> If I attempt that as a non-root user it segfaults. Any suggestions are
>>> welcome.
>>>
>>> I was actually able to recover most of the recordings we care about
>>> and I wanted to use this to clean up the rest.
>>>
>>> Tom
>>>
>>
>>Given how little I actually had to do here I just did this manually in
>>mythweb...but I'd still love to know what I was doing wrong there if I
>>ever need this.
>>
>>Thanks!
>>Tom
>
> In Python the indenting matters, so you may have had a problem with
> that. It is difficult to tell. And for Python it is also best to use
> UTF-8 (no signature) as the character set for storing files now.
> Python code can have UTF-8 characters in it and that can be important.
> I have put a copy of my working version on my web server:
>
> http://www.jsw.gen.nz/mythtv/find_orphans.py
>
> You might like to download it and check it against your vi version. I
> checked it against the official version today and it is identical,
> according to my diff program. And it works for me.

Thanks for that. Interestingly they were the same. Yea, for some
reason I have some very odd breakage happening there, and it behaves
differently running as root vs a non-root user. This is Gentoo running
Python 2.7.15.

Running it with python -v here's what I see failing when run as root:

# /usr/lib/python2.7/site-packages/MythTV/methodheap.pyc matches
/usr/lib/python2.7/site-packages/MythTV/methodheap.py
import MythTV.methodheap # precompiled from
/usr/lib/python2.7/site-packages/MythTV/methodheap.pyc
Traceback (most recent call last):
File "find_orphans.py", line 221, in <module>
DB = MythDB()
File "/usr/lib/python2.7/site-packages/MythTV/database.py", line
1264, in __init__
for tmpconfig in dbconfig.test(self.log):
File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 938, in test
for conn in XMLConnection.fromUPNP(5.0):
File "/usr/lib/python2.7/site-packages/MythTV/connections.py", line
607, in fromUPNP
ip, port = reLOC.match(res['location']).group(1,2)
AttributeError: 'NoneType' object has no attribute 'group'

So it clearly doesn't like something in that methodheap.
Interestingly, run an a non-root user it gets past that but segfaults
later:

# /usr/lib/python2.7/site-packages/MythTV/methodheap.pyc matches
/usr/lib/python2.7/site-packages/MythTV/methodheap.py
import MythTV.methodheap # precompiled from
/usr/lib/python2.7/site-packages/MythTV/methodheap.pyc
# /usr/lib/python2.7/site-packages/MySQLdb/connections.pyc matches
/usr/lib/python2.7/site-packages/MySQLdb/connections.py
import MySQLdb.connections # precompiled from
/usr/lib/python2.7/site-packages/MySQLdb/connections.pyc
# /usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.pyc
matches /usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.py
import MySQLdb.constants.CLIENT # precompiled from
/usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.pyc
# /usr/lib/python2.7/site-packages/MySQLdb/converters.pyc matches
/usr/lib/python2.7/site-packages/MySQLdb/converters.py
import MySQLdb.converters # precompiled from
/usr/lib/python2.7/site-packages/MySQLdb/converters.pyc
# /usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.pyc matches
/usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.py
import MySQLdb.constants.FLAG # precompiled from
/usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.pyc
Segmentation fault

Really odd one. Again, not all that important to me now, but strange.
Thanks again!

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HELP: HD died will need to delete all recordings [ In reply to ]
On Sat, 27 Oct 2018 09:38:39 -0400, you wrote:

>On 10/27/18, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>> On Fri, 26 Oct 2018 13:10:39 -0400, you wrote:
>>
>>>On 10/26/18, Tom Dexter <digitalaudiorock@gmail.com> wrote:
>>>> On 10/23/18, Michael T. Dean <mtdean@thirdcontact.com> wrote:
>>>>> find_orphans.py automatically deletes and _allows_ re-record, but you
>>>>> are correct that it will not create new rules to record the shows that
>>>>> are deleted (nor will any other mechanism for deletion). Any existing
>>>>> rules the cover the shows that get deleted will result in re-recording
>>>>> of the episodes. However rules that no longer exist (i.e. "this
>>>>> showing" or "find and record once" or ... rules) will need to be
>>>>> created
>>>>> again. Generally, though, those one-off rules tend to be for
>>>>> "opportunistic" recording of something less important, so probably
>>>>> aren't too much of a concern.
>>>>>
>>>>> Mike
>>>>
>>>> Wow...totally confused. How exactly should I be getting that
>>>> find_orphans.py script? I see it's not part of the mythtv distribution
>>>> itself, and that link above doesn't have any sort of raw download. I
>>>> attempted to copy and paste it into vi from that page (which really
>>>> rubbed me the wrong way), which looked ok (and appeared to have the
>>>> proper space indenting) but it fails miserably.
>>>>
>>>> Run as root I get this:
>>>>
>>>> ./find_orphans.py
>>>> Traceback (most recent call last):
>>>> File "./find_orphans.py", line 221, in <module>
>>>> DB = MythDB()
>>>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line
>>>> 1264, in __init__
>>>> for tmpconfig in dbconfig.test(self.log):
>>>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 938,
>>>> in
>>>> test
>>>> for conn in XMLConnection.fromUPNP(5.0):
>>>> File "/usr/lib/python2.7/site-packages/MythTV/connections.py", line
>>>> 607, in fromUPNP
>>>> ip, port = reLOC.match(res['location']).group(1,2)
>>>> AttributeError: 'NoneType' object has no attribute 'group'
>>>>
>>>> If I attempt that as a non-root user it segfaults. Any suggestions are
>>>> welcome.
>>>>
>>>> I was actually able to recover most of the recordings we care about
>>>> and I wanted to use this to clean up the rest.
>>>>
>>>> Tom
>>>>
>>>
>>>Given how little I actually had to do here I just did this manually in
>>>mythweb...but I'd still love to know what I was doing wrong there if I
>>>ever need this.
>>>
>>>Thanks!
>>>Tom
>>
>> In Python the indenting matters, so you may have had a problem with
>> that. It is difficult to tell. And for Python it is also best to use
>> UTF-8 (no signature) as the character set for storing files now.
>> Python code can have UTF-8 characters in it and that can be important.
>> I have put a copy of my working version on my web server:
>>
>> http://www.jsw.gen.nz/mythtv/find_orphans.py
>>
>> You might like to download it and check it against your vi version. I
>> checked it against the official version today and it is identical,
>> according to my diff program. And it works for me.
>
>Thanks for that. Interestingly they were the same. Yea, for some
>reason I have some very odd breakage happening there, and it behaves
>differently running as root vs a non-root user. This is Gentoo running
>Python 2.7.15.
>
>Running it with python -v here's what I see failing when run as root:
>
># /usr/lib/python2.7/site-packages/MythTV/methodheap.pyc matches
>/usr/lib/python2.7/site-packages/MythTV/methodheap.py
>import MythTV.methodheap # precompiled from
>/usr/lib/python2.7/site-packages/MythTV/methodheap.pyc
>Traceback (most recent call last):
> File "find_orphans.py", line 221, in <module>
> DB = MythDB()
> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line
>1264, in __init__
> for tmpconfig in dbconfig.test(self.log):
> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 938, in test
> for conn in XMLConnection.fromUPNP(5.0):
> File "/usr/lib/python2.7/site-packages/MythTV/connections.py", line
>607, in fromUPNP
> ip, port = reLOC.match(res['location']).group(1,2)
>AttributeError: 'NoneType' object has no attribute 'group'
>
>So it clearly doesn't like something in that methodheap.
>Interestingly, run an a non-root user it gets past that but segfaults
>later:
>
># /usr/lib/python2.7/site-packages/MythTV/methodheap.pyc matches
>/usr/lib/python2.7/site-packages/MythTV/methodheap.py
>import MythTV.methodheap # precompiled from
>/usr/lib/python2.7/site-packages/MythTV/methodheap.pyc
># /usr/lib/python2.7/site-packages/MySQLdb/connections.pyc matches
>/usr/lib/python2.7/site-packages/MySQLdb/connections.py
>import MySQLdb.connections # precompiled from
>/usr/lib/python2.7/site-packages/MySQLdb/connections.pyc
># /usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.pyc
>matches /usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.py
>import MySQLdb.constants.CLIENT # precompiled from
>/usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.pyc
># /usr/lib/python2.7/site-packages/MySQLdb/converters.pyc matches
>/usr/lib/python2.7/site-packages/MySQLdb/converters.py
>import MySQLdb.converters # precompiled from
>/usr/lib/python2.7/site-packages/MySQLdb/converters.pyc
># /usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.pyc matches
>/usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.py
>import MySQLdb.constants.FLAG # precompiled from
>/usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.pyc
>Segmentation fault
>
>Really odd one. Again, not all that important to me now, but strange.
>Thanks again!
>
>Tom

As root, the actual crash is happening in a module of the MythTV
Python bindings. So do you have the correct version of that
installed? Does it match your MythTV version? Maybe it would be
worthwhile trying reinstalling that package. In Ubuntu, the package
is libmyth-python.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HELP: HD died will need to delete all recordings [ In reply to ]
On 10/27/18 9:20 AM, Stephen Worthington wrote:
> On Sat, 27 Oct 2018 09:38:39 -0400, you wrote:
>
>> On 10/27/18, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>> On Fri, 26 Oct 2018 13:10:39 -0400, you wrote:
>>>
>>>> On 10/26/18, Tom Dexter <digitalaudiorock@gmail.com> wrote:
>>>>> On 10/23/18, Michael T. Dean <mtdean@thirdcontact.com> wrote:
>>>>>> find_orphans.py automatically deletes and _allows_ re-record, but you
>>>>>> are correct that it will not create new rules to record the shows that
>>>>>> are deleted (nor will any other mechanism for deletion). Any existing
>>>>>> rules the cover the shows that get deleted will result in re-recording
>>>>>> of the episodes. However rules that no longer exist (i.e. "this
>>>>>> showing" or "find and record once" or ... rules) will need to be
>>>>>> created
>>>>>> again. Generally, though, those one-off rules tend to be for
>>>>>> "opportunistic" recording of something less important, so probably
>>>>>> aren't too much of a concern.
>>>>>>
>>>>>> Mike
>>>>>
>>>>> Wow...totally confused. How exactly should I be getting that
>>>>> find_orphans.py script? I see it's not part of the mythtv distribution
>>>>> itself, and that link above doesn't have any sort of raw download. I
>>>>> attempted to copy and paste it into vi from that page (which really
>>>>> rubbed me the wrong way), which looked ok (and appeared to have the
>>>>> proper space indenting) but it fails miserably.
>>>>>
>>>>> Run as root I get this:
>>>>>
>>>>> ./find_orphans.py
>>>>> Traceback (most recent call last):
>>>>> File "./find_orphans.py", line 221, in <module>
>>>>> DB = MythDB()
>>>>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line
>>>>> 1264, in __init__
>>>>> for tmpconfig in dbconfig.test(self.log):
>>>>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 938,
>>>>> in
>>>>> test
>>>>> for conn in XMLConnection.fromUPNP(5.0):
>>>>> File "/usr/lib/python2.7/site-packages/MythTV/connections.py", line
>>>>> 607, in fromUPNP
>>>>> ip, port = reLOC.match(res['location']).group(1,2)
>>>>> AttributeError: 'NoneType' object has no attribute 'group'
>>>>>
>>>>> If I attempt that as a non-root user it segfaults. Any suggestions are
>>>>> welcome.
>>>>>
>>>>> I was actually able to recover most of the recordings we care about
>>>>> and I wanted to use this to clean up the rest.
>>>>>
>>>>> Tom
>>>>>
>>>>
>>>> Given how little I actually had to do here I just did this manually in
>>>> mythweb...but I'd still love to know what I was doing wrong there if I
>>>> ever need this.
>>>>
>>>> Thanks!
>>>> Tom
>>>
>>> In Python the indenting matters, so you may have had a problem with
>>> that. It is difficult to tell. And for Python it is also best to use
>>> UTF-8 (no signature) as the character set for storing files now.
>>> Python code can have UTF-8 characters in it and that can be important.
>>> I have put a copy of my working version on my web server:
>>>
>>> http://www.jsw.gen.nz/mythtv/find_orphans.py
>>>
>>> You might like to download it and check it against your vi version. I
>>> checked it against the official version today and it is identical,
>>> according to my diff program. And it works for me.
>>
>> Thanks for that. Interestingly they were the same. Yea, for some
>> reason I have some very odd breakage happening there, and it behaves
>> differently running as root vs a non-root user. This is Gentoo running
>> Python 2.7.15.
>>
>> Running it with python -v here's what I see failing when run as root:
>>
>> # /usr/lib/python2.7/site-packages/MythTV/methodheap.pyc matches
>> /usr/lib/python2.7/site-packages/MythTV/methodheap.py
>> import MythTV.methodheap # precompiled from
>> /usr/lib/python2.7/site-packages/MythTV/methodheap.pyc
>> Traceback (most recent call last):
>> File "find_orphans.py", line 221, in <module>
>> DB = MythDB()
>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line
>> 1264, in __init__
>> for tmpconfig in dbconfig.test(self.log):
>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 938, in test
>> for conn in XMLConnection.fromUPNP(5.0):
>> File "/usr/lib/python2.7/site-packages/MythTV/connections.py", line
>> 607, in fromUPNP
>> ip, port = reLOC.match(res['location']).group(1,2)
>> AttributeError: 'NoneType' object has no attribute 'group'
>>
>> So it clearly doesn't like something in that methodheap.
>> Interestingly, run an a non-root user it gets past that but segfaults
>> later:
>>
>> # /usr/lib/python2.7/site-packages/MythTV/methodheap.pyc matches
>> /usr/lib/python2.7/site-packages/MythTV/methodheap.py
>> import MythTV.methodheap # precompiled from
>> /usr/lib/python2.7/site-packages/MythTV/methodheap.pyc
>> # /usr/lib/python2.7/site-packages/MySQLdb/connections.pyc matches
>> /usr/lib/python2.7/site-packages/MySQLdb/connections.py
>> import MySQLdb.connections # precompiled from
>> /usr/lib/python2.7/site-packages/MySQLdb/connections.pyc
>> # /usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.pyc
>> matches /usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.py
>> import MySQLdb.constants.CLIENT # precompiled from
>> /usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.pyc
>> # /usr/lib/python2.7/site-packages/MySQLdb/converters.pyc matches
>> /usr/lib/python2.7/site-packages/MySQLdb/converters.py
>> import MySQLdb.converters # precompiled from
>> /usr/lib/python2.7/site-packages/MySQLdb/converters.pyc
>> # /usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.pyc matches
>> /usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.py
>> import MySQLdb.constants.FLAG # precompiled from
>> /usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.pyc
>> Segmentation fault
>>
>> Really odd one. Again, not all that important to me now, but strange.
>> Thanks again!
>>
>> Tom
>
> As root, the actual crash is happening in a module of the MythTV
> Python bindings. So do you have the correct version of that
> installed? Does it match your MythTV version? Maybe it would be
> worthwhile trying reinstalling that package. In Ubuntu, the package
> is libmyth-python.

For the root case, I can duplicate the failure because there's
no .mythtv/config.xml.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HELP: HD died will need to delete all recordings [ In reply to ]
On 10/27/18, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
> On Sat, 27 Oct 2018 09:38:39 -0400, you wrote:
>
>>Thanks for that. Interestingly they were the same. Yea, for some
>>reason I have some very odd breakage happening there, and it behaves
>>differently running as root vs a non-root user. This is Gentoo running
>>Python 2.7.15.
>>
>>Running it with python -v here's what I see failing when run as root:
>>
>># /usr/lib/python2.7/site-packages/MythTV/methodheap.pyc matches
>>/usr/lib/python2.7/site-packages/MythTV/methodheap.py
>>import MythTV.methodheap # precompiled from
>>/usr/lib/python2.7/site-packages/MythTV/methodheap.pyc
>>Traceback (most recent call last):
>> File "find_orphans.py", line 221, in <module>
>> DB = MythDB()
>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line
>>1264, in __init__
>> for tmpconfig in dbconfig.test(self.log):
>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 938, in
>> test
>> for conn in XMLConnection.fromUPNP(5.0):
>> File "/usr/lib/python2.7/site-packages/MythTV/connections.py", line
>>607, in fromUPNP
>> ip, port = reLOC.match(res['location']).group(1,2)
>>AttributeError: 'NoneType' object has no attribute 'group'
>>
>>So it clearly doesn't like something in that methodheap.
>>Interestingly, run an a non-root user it gets past that but segfaults
>>later:
>>
>># /usr/lib/python2.7/site-packages/MythTV/methodheap.pyc matches
>>/usr/lib/python2.7/site-packages/MythTV/methodheap.py
>>import MythTV.methodheap # precompiled from
>>/usr/lib/python2.7/site-packages/MythTV/methodheap.pyc
>># /usr/lib/python2.7/site-packages/MySQLdb/connections.pyc matches
>>/usr/lib/python2.7/site-packages/MySQLdb/connections.py
>>import MySQLdb.connections # precompiled from
>>/usr/lib/python2.7/site-packages/MySQLdb/connections.pyc
>># /usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.pyc
>>matches /usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.py
>>import MySQLdb.constants.CLIENT # precompiled from
>>/usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.pyc
>># /usr/lib/python2.7/site-packages/MySQLdb/converters.pyc matches
>>/usr/lib/python2.7/site-packages/MySQLdb/converters.py
>>import MySQLdb.converters # precompiled from
>>/usr/lib/python2.7/site-packages/MySQLdb/converters.pyc
>># /usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.pyc matches
>>/usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.py
>>import MySQLdb.constants.FLAG # precompiled from
>>/usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.pyc
>>Segmentation fault
>>
>>Really odd one. Again, not all that important to me now, but strange.
>>Thanks again!
>>
>>Tom
>
> As root, the actual crash is happening in a module of the MythTV
> Python bindings. So do you have the correct version of that
> installed? Does it match your MythTV version? Maybe it would be
> worthwhile trying reinstalling that package. In Ubuntu, the package
> is libmyth-python.

This is a Gentoo ebuild that gets all the python stuff out of the
exact same git version as everything else, so there's no chance of
that being incorrect.

What I did notice, as per Bill's reply, root had no
.mythtv/config.xml. However if I add that, then root segfaults in the
same manner as a non-root user. Really odd.

It's very doubtful that I have a core python issue. Python tends to be
very solid in Gentoo, especially given that it's used for portage
itself.

Tom

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HELP: HD died will need to delete all recordings [ In reply to ]
On 10/27/18, Tom Dexter <digitalaudiorock@gmail.com> wrote:
> On 10/27/18, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>> On Sat, 27 Oct 2018 09:38:39 -0400, you wrote:
>>
>>>Thanks for that. Interestingly they were the same. Yea, for some
>>>reason I have some very odd breakage happening there, and it behaves
>>>differently running as root vs a non-root user. This is Gentoo running
>>>Python 2.7.15.
>>>
>>>Running it with python -v here's what I see failing when run as root:
>>>
>>># /usr/lib/python2.7/site-packages/MythTV/methodheap.pyc matches
>>>/usr/lib/python2.7/site-packages/MythTV/methodheap.py
>>>import MythTV.methodheap # precompiled from
>>>/usr/lib/python2.7/site-packages/MythTV/methodheap.pyc
>>>Traceback (most recent call last):
>>> File "find_orphans.py", line 221, in <module>
>>> DB = MythDB()
>>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line
>>>1264, in __init__
>>> for tmpconfig in dbconfig.test(self.log):
>>> File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 938,
>>> in
>>> test
>>> for conn in XMLConnection.fromUPNP(5.0):
>>> File "/usr/lib/python2.7/site-packages/MythTV/connections.py", line
>>>607, in fromUPNP
>>> ip, port = reLOC.match(res['location']).group(1,2)
>>>AttributeError: 'NoneType' object has no attribute 'group'
>>>
>>>So it clearly doesn't like something in that methodheap.
>>>Interestingly, run an a non-root user it gets past that but segfaults
>>>later:
>>>
>>># /usr/lib/python2.7/site-packages/MythTV/methodheap.pyc matches
>>>/usr/lib/python2.7/site-packages/MythTV/methodheap.py
>>>import MythTV.methodheap # precompiled from
>>>/usr/lib/python2.7/site-packages/MythTV/methodheap.pyc
>>># /usr/lib/python2.7/site-packages/MySQLdb/connections.pyc matches
>>>/usr/lib/python2.7/site-packages/MySQLdb/connections.py
>>>import MySQLdb.connections # precompiled from
>>>/usr/lib/python2.7/site-packages/MySQLdb/connections.pyc
>>># /usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.pyc
>>>matches /usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.py
>>>import MySQLdb.constants.CLIENT # precompiled from
>>>/usr/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.pyc
>>># /usr/lib/python2.7/site-packages/MySQLdb/converters.pyc matches
>>>/usr/lib/python2.7/site-packages/MySQLdb/converters.py
>>>import MySQLdb.converters # precompiled from
>>>/usr/lib/python2.7/site-packages/MySQLdb/converters.pyc
>>># /usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.pyc matches
>>>/usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.py
>>>import MySQLdb.constants.FLAG # precompiled from
>>>/usr/lib/python2.7/site-packages/MySQLdb/constants/FLAG.pyc
>>>Segmentation fault
>>>
>>>Really odd one. Again, not all that important to me now, but strange.
>>>Thanks again!
>>>
>>>Tom
>>
>> As root, the actual crash is happening in a module of the MythTV
>> Python bindings. So do you have the correct version of that
>> installed? Does it match your MythTV version? Maybe it would be
>> worthwhile trying reinstalling that package. In Ubuntu, the package
>> is libmyth-python.
>
> This is a Gentoo ebuild that gets all the python stuff out of the
> exact same git version as everything else, so there's no chance of
> that being incorrect.
>
> What I did notice, as per Bill's reply, root had no
> .mythtv/config.xml. However if I add that, then root segfaults in the
> same manner as a non-root user. Really odd.
>
> It's very doubtful that I have a core python issue. Python tends to be
> very solid in Gentoo, especially given that it's used for portage
> itself.
>
> Tom
>
> Tom
>

I figured this out. Re-compiling the dev-python/mysql-python fixed
this. There was a recent change in the ABI in dev-db/mysql-connector
and I was specifically supposed to rebuild that (and possibly others)
by running revdep-rebuild against libmysqlclient.so.18, which I missed

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org