mythtv python bindings crash with an IndexError

Bug #1051872 reported by Raj B
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MythTV
Fix Released
Unknown
Mythbuntu
Fix Released
Medium
Unassigned

Bug Description

Hi,

I'm using the latest 0.26 precise mythtv APKs. the current libmythtv-perl (all the other mythtv packages are the same version) version is

2:0.26.0~master.20120917.0a56d7f-0ubuntu0mythbuntu2

For the last week or so, I've realized that I cannot download metadata. I debugged further and the mythtv python libraries are throwing an IndexError. The full error is

root@mythtv:~/Data# mythwikiscripts
Traceback (most recent call last):
  File "/usr/bin/mythwikiscripts", line 3, in <module>
    from MythTV.wikiscripts import *
  File "/usr/lib/python2.7/dist-packages/MythTV/__init__.py", line 41, in <module>
    from dataheap import *
  File "/usr/lib/python2.7/dist-packages/MythTV/dataheap.py", line 583, in <module>
    class Job( DBDataWrite, JOBTYPE, JOBCMD, JOBFLAG, JOBSTATUS ):
  File "/usr/lib/python2.7/dist-packages/MythTV/dataheap.py", line 589, in Job
    _defaults = {'id':None, 'inserttime':datetime.now(),
  File "/usr/lib/python2.7/dist-packages/MythTV/utility/dt.py", line 237, in now
    obj = super(datetime, cls).now(tz)
  File "/usr/lib/python2.7/dist-packages/MythTV/utility/dt.py", line 55, in utcoffset
    return timedelta(0, self._get_transition(dt).offset)
  File "/usr/lib/python2.7/dist-packages/MythTV/utility/dt.py", line 38, in _get_transition
    if dt < self._transitions[index].local[0:5]:
IndexError: tuple index out of range(

I'm not sure how to fix this. I've removed all the python scripts and reinstalled. no change. i've diffed the python scripts (dataheap.py and dt.py) with the mythth git version. They are identical.

I've added the timezone data to mysql and verified that it works by logging into mysql and doing something like

SELECT CONVERT_TZ('2012-06-07 12:00:00', 'GMT', 'America/New_York');

the correct response (shown below) is returned

+--------------------------------------------------------------+
| CONVERT_TZ('2012-06-07 12:00:00', 'GMT', 'America/New_York') |
+--------------------------------------------------------------+
| 2012-06-07 08:00:00 |
+--------------------------------------------------------------+

What can I do to fix this?

my mythtv box is running the latest precise packages.

It might be a mythbuntu and/or ubuntu precise issue as nobody is reporting this error (which affects every python script) on the mythtv mailing lists and bug repository.

Thanks,

Raj

Revision history for this message
Mario Limonciello (superm1) wrote :

I've forwarded this bug upstream at the associated ticket. Subscribe to that or keep an eye on it for questions that upstream may have. They might want logs or other details or something like that.

Changed in mythbuntu:
status: New → Triaged
importance: Undecided → Medium
Changed in mythtv:
status: Unknown → New
Revision history for this message
Mario Limonciello (superm1) wrote :

upstream committed a handful of fixes. can you test the new build that will happen tonight to see if they're fixed? Also if they're not fixed, please post :

1) the new version you tested with (so we can double check the commits were included)
2) your architecture (32/64) tonight's build tonight's build
3) the contents of /etc/localtime

Changed in mythbuntu:
status: Triaged → Fix Committed
Revision history for this message
Raj B (bigwoof) wrote :

okay. will do so tonight when I get back.

my build is amd64 b.t.w.

Thanks!

Raj

Revision history for this message
Raj B (bigwoof) wrote :

just got back and tested the latest mythtv version (2:0.26.0~master.20120918.91c3e66-0ubuntu0mythbuntu2) for amd64 precise.

The python error is gone and everything seems to be working now.

Thanks!!

Raj

Changed in mythtv:
status: New → Fix Released
Changed in mythbuntu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.