[mythtv-users] find_orphans.py broken on 32 bit x86?

Tom Dexter digitalaudiorock at gmail.com
Sun Nov 4 14:16:51 UTC 2018


On 11/3/18, Tom Dexter <digitalaudiorock at gmail.com> wrote:
> On 10/31/18, Tom Dexter <digitalaudiorock at gmail.com> wrote:
>> On 10/31/18, Jonatan Lindblad <lindbladjonatan at gmail.com> wrote:
>>>
>>> I'm pretty sure it's the bookmarkupdate value that's the problem,
>>> https://forum.mythtv.org/viewtopic.php?f=36&t=1716&start=15.
>>>
>>> Jonatan
>>
>> Bingo...that was it. Something's clearly trying to use that 0000-00-00
>> 00:00:00. When I manually updated that to the CURRENT_TIMESTAMP
>> find_orphans.py worked. As noted in that forum topic, it's not a
>> solution...but still good to know.
>>
>> Thanks!
>> Tom
>>
>
> Interesting. I've been able to narrow this failure down. The
> getProgram() method of the Recorded class will always fail in this
> same manner for any recorded entry that still has the default
> 0000-00-00 00:00:00 value for bookmarkupdate. Here's a simple script
> where I can reproduce this using any such recording (by chanid and
> starttime):
>
> #!/usr/bin/env python2
> from MythTV import MythDB, MythBE, Recorded, MythError
> import datetime, pytz
> DB = MythDB()
> kwargs = {'chanid': 1111, 'starttime': datetime.datetime(2018, 11, 3,
> 1, 0, 0, 0, pytz.utc)}
> recs = list(DB.searchRecorded(**kwargs))
>
> for rec in recs:
>     print rec.title
>     p = rec.getProgram()
>
> If the specified recording has ever been bookmarked that works fine.
> However for anything that hasn't I bet this:
>
> python test.py
> Crazy Ex-Girlfriend
> Traceback (most recent call last):
>   File "test.py", line 11, in <module>
>     p = rec.getProgram()
>   File "/usr/lib/python2.7/site-packages/MythTV/dataheap.py", line
> 387, in getProgram
>     return Program.fromRecorded(self)
>   File "/usr/lib/python2.7/site-packages/MythTV/mythproto.py", line
> 946, in fromRecorded
>     return be.getRecording(rec.chanid, rec.starttime)
>   File "/usr/lib/python2.7/site-packages/MythTV/mythproto.py", line
> 647, in getRecording
>     return Program(res[1:], db=self.db)
>   File "/usr/lib/python2.7/site-packages/MythTV/mythproto.py", line
> 875, in __init__
>     DictData.__init__(self, raw)
>   File "/usr/lib/python2.7/site-packages/MythTV/altdict.py", line 148,
> in __init__
>     data = self._process(data)
>   File "/usr/lib/python2.7/site-packages/MythTV/altdict.py", line 164,
> in _process
>     data[i] = self._trans[self._field_type[i]](v)
>   File "/usr/lib/python2.7/site-packages/MythTV/altdict.py", line 104,
> in <lambda>
>     lambda x: datetime.fromtimestamp(x, datetime.UTCTZ())\
>   File "/usr/lib/python2.7/site-packages/MythTV/utility/dt.py", line
> 304, in fromtimestamp
>     obj = super(datetime, cls).fromtimestamp(float(timestamp), tz)
> ValueError: timestamp out of range for platform time_t
>
> I'm not yet totally clear, but I think there are conversions happening
> there automatically based on the database column data type, and that
> one fails.
>
> Tom
>

Ahh...this is apparently nothing new...just stumbled upon this:

https://code.mythtv.org/trac/ticket/12772

Tom


More information about the mythtv-users mailing list