Hi! During the last days, the recordserver crashed, first occasionally, now at every start. I just debugged it a little bit and found this crash:
Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/freevo/helpers/recordserver.py", line 1465, in <module> main() File "/usr/lib/python2.5/site-packages/freevo/helpers/recordserver.py", line 1431, in main recordserver = RecordServer() File "/usr/lib/python2.5/site-packages/freevo/helpers/recordserver.py", line 140, in __init__ self.updateFavoritesSchedule() File "/usr/lib/python2.5/site-packages/freevo/helpers/recordserver.py", line 1284, in updateFavoritesSchedule self.scheduleRecording(prog) File "/usr/lib/python2.5/site-packages/freevo/helpers/recordserver.py", line 710, in scheduleRecording (ableToResolveBool, resolutionReason, progsToChange) = self.conflictResolution(prog) File "/usr/lib/python2.5/site-packages/freevo/helpers/recordserver.py", line 576, in conflictResolution progsToChange.append(('del', scheduledConflictProgram)) AttributeError: 'NoneType' object has no attribute 'append' WARNUNG: 'NoneType' object has no attribute 'append' Updating to the current SVN version did not change anything. Looking at the code, this branch of the code cannot ever have worked; probably it is too seldomly called for anyone to have noticed this bug. The problem is that 'progsToChange' is None; this is because 'getRatedConflicts' explicitly returns (in two places) a triple with the last item (unpacked as progsToChange) being None: (result, ratedConflicts, progsToChange) = getRatedConflicts(... if result: return ... if not ratedConflicts: return ... [code doing conflict resolution and expecting progsToChange to be a list follows] Obviously, in most situations on of the if-branches is hit and the code below does not crash. In case this helps, here's a snipped from the log: 2009-01-29 21:45:15,371 INFO recordserver.py (268): Got ScheduledRecordings (version 3). 2009-01-29 21:45:15,770 INFO recordserver.py (534): Conflict resolution enabled 2009-01-29 21:45:15,795 INFO recordserver.py (841): PROGRAM MATCH 3: So Feb 01 20:15->21:15 (20:15 ) CNI0DB9 Navy CIS 2009-01-29 21:45:15,838 INFO recordserver.py (845): Found 1 matches. 2009-01-29 21:45:15,839 INFO recordserver.py (480): Exact Matches 1 2009-01-29 21:45:15,843 INFO recordserver.py (529): Conflict Found 2009-01-29 21:45:15,844 INFO recordserver.py (555): Going into conflict resolution via scheduled program re-scheduling [above traceback follows] 2009-01-29 21:45:15,859 WARNING recordserver.py (1473): 'NoneType' object has no attribute 'append' BTW: How do I enable the output of all the _debug_('...', 2) lines? (I tried setting DEBUG and DEBUG_RECORDSERVER to 2, but that did not do the trick.) I am tempted to commit the attached patch which seems to fix the problem. -- Ciao, / / .o. /--/ ..o / / ANS ooo
Index: src/helpers/recordserver.py =================================================================== --- src/helpers/recordserver.py (Revision 11270) +++ src/helpers/recordserver.py (Arbeitskopie) @@ -517,7 +517,7 @@ occurances = exactMatch(self, prog) if not occurances: #program no longer exists - return (False, None, None) + return (False, None, []) #Search through all occurances of looking for a non-conflicted occurance for oneOccurance in occurances: (rating, conflictedProgs) = getConflicts(self, oneOccurance, myScheduledRecordings) @@ -528,7 +528,7 @@ return(True, ratedConflicts, programsToChange) _debug_('Conflict Found', DINFO) ratedConflicts.append((rating, conflictedProgs, oneOccurance)) - return (False, ratedConflicts, None) + return (False, ratedConflicts, []) if config.TV_RECORD_CONFLICT_RESOLUTION: _debug_('Conflict resolution enabled', DINFO)
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel