(I posted my original problem to the users list, but as I started writing this reply, I realized it was so technical and code-based, it was probably better to move it over to the developer list. You can read the quoted section to see the original message)
A ha, the plot thickens... I did a bit of post-Christmas party troubleshooting, and I've narrowed down the problem (but still have little idea how to properly correct it). I've traced the problem to getVideoGroup() in channels.py. It's throwing the exception in a segment that doesn't handle it, so it is thrown back up the line to ivtv_record.py where it is handled and logged. I've been using _debug_ statements like they were going out of style, and have finally narrowed things down. Let me briefly outline the flow of the getVideoGroup() function as I see it, and point out the problem. It comes in and first makes the video group the negative of the channel. This is so negative channels can directly select video groups for external inputs, etc. Fair enough. So lets say I'm trying to tune in channel 5. Group is now equal to -5. If group is less than or equal to zero, it figures this must be a channel and not a direct-select, so it goes on to try to match the channel to the list in config.TV_CHANNELS. It does this properly, going down the list and finds channel 5. Then it checks the array length of the channel info to see if it's greater than 4. I'm pretty sure I know what's in the channel info and have confirmed that all my entries (autogenerated through xmltv's listings) have only the basic three entries: xmltv channel id, freevo display name and tv channel name. Since the length isn't greater than 4, it doesn't try to assign the fourth array item to group. It tries to make group = int(group) and if it throws a ValueError exception, assigns zero to group (this is to weed out channel names with string charaters in them?). At this point, group is still -5, and this is where trouble is about to happen. The next block is run if not isplayer, and in this case that is true, because we're setting up to record. The function then tries to assign record_group from config.TV_VIDEO_GROUPS[group].record_group. Well group still equals -5! It tries to find config.TV_VIDEO_GROUPS[-5].record_group and coughs up an exception that the list index is out of range. (On reviewing this e-mail before sending it, it occurs to me it would throw an exception if isplayer equals true, because it will try to return TV_VIDEO_GROUPS[-5] at the end of the function. However I ordinarily don't watch TV through my Freevo, so I wouldn't have noticed this either) I think I mostly understand what's going on here, between detecting a negative channel to assign a video group directly, and the block looking for more than 4 array items in a channel info entry (this is to let you assign specific groups to specific channels?). But if neither of these items are the case, it appears to let group slip past as its original negative entry. I've got a show scheduled to record on Sunday night... alright, so it's only Robot Chicken, but I still enjoy it and am a little miffed at missing last week's show. If I don't get a definitive answer from anyone on this, I'm going to try a few lines right before 'if not isplayer' that checks if group is still negative, and if it is, assigns it back to zero. Kind of a 'if it's not a direct select and the channel info has no special instructions, go with the default' thing. For the record: Currently running Freevo SVN-12244. Channels.py and ivtv_record.py are rev 11213... system vitals were quoted in the original e-mail below. Let me know if I'm on the right track and found a good one, and if my solution is viable. James P.S. I was confused by the len(chan_info) > 4 then group = chan_info[4] statement. I was writing up a whole section about shouldn't it be different... Until I started writing how confusing it was that len returned total items, but the arrays were zero-indexed. And there was this blinding flash of enlightenment and the statement made complete and total sense. Nice to know I can 'talk' my way through something and then suddenly understand it. ^_^ ----- Original Message ---- > From: James Trietsch <kero...@yahoo.com> > To: freevo-us...@lists.sourceforge.net > Sent: Wednesday, December 24, 2008 11:44:05 PM > Subject: [Freevo-users] Updated to SVN-12244, ivtv_record.py now throwing a > fatal exception > > First, Freevo has been performing flawlessly for months now. Okay, so there > are a > few flaws, but I've got them noted and am kinda working on the ones I think I > can address. More on that at another time. > > Second, I am so far behind on this list I will never catch up. I want to see > what's been going on, but... anyway, I'll keep an eye out at the top for > replies > to this. > > Now, the problem: Last weekend I updated to svn-12244. No noticeable issues > on > the GUI, recordings were still being set up, favorites tracked... it was > flawless. Of course it couldn't be that easy. > > I find out today that there's trouble with the recording system. It's trying, > but ivtv_record.py is throwing out an exception when it's setting up to > record. > From the recordserver logs: > > 2008-12-24 22:31:15,466 DEBUG recordserver.py (250): using cached schedule > 2008-12-24 22:31:15,466 DEBUG record_types.py (270): getFavorites() > 2008-12-24 22:31:15,472 DEBUG recordserver.py (1146): isProgAFavorite(Wed > Dec > 24 20:00->23:00 (20:00) I10590.labs.zap2it.com It's a Wonderful Life) > 2008-12-24 22:31:15,958 DEBUG ivtv_record.py (113): Record_Thread::run: > mode=record > 2008-12-24 22:31:15,958 INFO ivtv_record.py (120): Record_Thread::run: > started recording > 2008-12-24 22:31:15,959 DEBUG channels.py (77): FreevoChannels.__init__() > 2008-12-24 22:31:15,959 DEBUG channels.py (279): getChannel() > 2008-12-24 22:31:15,959 DEBUG ivtv_record.py (123): Channel: 2 > 2008-12-24 22:31:15,960 DEBUG channels.py (89): getVideoGroup(chan='4', > isplayer=False, chan_index=2) > 2008-12-24 22:31:15,960 CRITICAL ivtv_record.py (226): list index out of range > > It seems when it comes to finding the video group: > > vg = fc.getVideoGroup(self.prog.tunerid, False) > > it throws an exception. I feel like it's not finding the proper video group > for > the channel (all channels should be the same device/group). I feel like it's > something in the VideoGroups configuration, and I feel like I've read the > solution before on this list... but I did some mailing list searches and > couldn't dig up anything useful. > > Vitals: > > AMD Athlon XP1900+ > 512MB RAM > Matrox G400 MAX > Debian Sarge (I believe?) > Kernel 2.6.18-6 (optimized for k7) > Python 2.5 > > VideoGroups config segment: > > TV_VIDEO_GROUPS = [ > # Use this group for watching tv > VideoGroup(vdev='/dev/video0', > adev=None, > input_type='tuner 1', > input_num=0, > tuner_norm=CONF.tv, > tuner_type='', > tuner_chanlist=CONF.chanlist, > desc='Watching Video Group', > group_type='ivtv', > record_group=1), > # Use this group for recording tv > VideoGroup(vdev='/dev/video0', > adev=None, > input_type='tuner1', > tuner_norm=CONF.tv, > tuner_type='', > tuner_chanlist=CONF.chanlist, > desc='Recording Video Group', > group_type='ivtv', > record_group=None) > ] > > Can anyone offer any help? If I've left out any other vital information, > write > back and let me know and I'll get it for you and post it up. > > Thanks in advance, and here's hoping it's something really easy. ------------------------------------------------------------------------------ _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel