[mythtvnz] Python error in mhegepgsnoop
David Moore
dmoo1790 at ihug.co.nz
Sat May 23 01:42:01 BST 2015
On 22/05/15 23:00, Robin Gilks wrote:
>> Hi Robin, been a long time since I've looked at the code but I'll try
>> and figure it out for you. First the error
>>
>> AttributeError: 'Namespace' object has no attribute 'clean_titles2'
>>
>> is a strange one which might be something to do with Python versions.
>> What version of Python are you running?
>>
>> The tuning problem seems to be due to a non-integer value for (possibly)
>> the frequency or inversion parameters stored in the mythtv database. I
>> wouldn't have thought the frequency would ever be anything but a number
>> but maybe a letter is a valid value for the inversion parameter. Can you
>> execute the following query in mysql and show me what is returned?
>>
>> select channum, frequency, inversion from channel join dtv_multiplex on
>> channel.mplexid=dtv_multiplex.mplexid where channum=33;
> I'm running the new stable Debian Jessie.
>
> $ python --version
> Python 2.7.9
>
> I thought the channel number was the NZ standard UHF channel -> frequency,
> not the numeric label I had given it for a particular program. That won't
> work for me as I use the same channel numbers for DVB-S as well as DVB-T
> and then set the UHF high def channels at a higher priority.
>
> +---------+-----------+-----------+
> | channum | frequency | inversion |
> +---------+-----------+-----------+
> | 1 | 12483000 | a |
> | 1 | 578000000 | a |
> +---------+-----------+-----------+
>
> It all seems to work OK when the backend is running, even when nothing is
> being recorded, I don't need the tuning parameter. Something about opening
> the TBS6281 maybe?
>
> Appreciate your looking at it anyway...
>
Yes, I think it was Stephen W who pointed out to me that if you don't
tell mythtv to release channels when it is not recording they stay
locked and hence available for other code like mhegepgsnoop to read
from. I forget the exact option which keeps the channel locked.
Something to do with EIT maybe?
Turns out 'a' (as shown in your sql dump) is the default value for
inversion and (I think) means 'auto'. I think this needs to be converted
to an unsigned int with a value of 2 before it gets sent to your tuner
card however I need to check/test this.
It hadn't occurred to me that channum might not be unique. The chanid is
unique but how does the user know what it is without going into
mythbackend setup or mysql? Maybe that is OK for typical mythtv users. I
need to think that through. Any suggestions welcomed. One kludge I
thought of was to create a dummy channel with a unique channum which you
only use for getting the epg. Sounds painful to set up.
I think the other problem you had with clean_titles2 is a bug. I tried
to make the code work with the old optparse command line parser and the
new argparse parser but I think I must have screwed up the clean titles
bit. I will try and fix this also.
No promises about when I'll get this done. :)
More information about the mythtvnz
mailing list