Web browser: ---
            Bug ID: 59525
           Summary: DRTRIGON-90 sequence of sometimes occuring "KeyError:
           Product: Tool Labs tools
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: Unprioritized
         Component: DrTrigonBot - General
    Classification: Unclassified
   Mobile Platform: ---

This issue was converted from
Summary: sequence of sometimes occuring "KeyError: u'parse'"
Issue type: Sub-task - The sub-task of the issue
Priority: Minor
Status: In Progress
Assignee: drtrigon <>

From: drtrigon <>
Date: Sat, 09 Jul 2011 11:14:57

The error:

> Traceback (most recent call last):  
File "/home/drtrigon/pywikipedia/", line 225, in run  
File "/home/drtrigon/pywikipedia/", line 1307, in main  
File "/home/drtrigon/pywikipedia/", line 369, in run  
File "/home/drtrigon/pywikipedia/", line 747, in
entries = PageSections(page, self._param)  
File "/home/drtrigon/pywikipedia/", line 1138, in __init__  
sections = page.getSections(minLevel=1)  
File "/home/drtrigon/pywikipedia/dtbext/", line 50, in
obj.__dict__[\'getSections\'] = lambda *args, **kwds:
Page.__dict__[\'getSections\'](obj, *args, **kwds)  
File "/home/drtrigon/pywikipedia/dtbext/", line 160, in
r = result[u\'parse\'][u\'sections\']  
KeyError: u'parse'

occurs from time to time - look at [1] and older changes. As temporary
work-a-round the error raised is converted to 

> pywikibot.Error('Problem occured during data retrieval for sections in %s!' % 
> self.title(asLink=True))

and the 'result' dict gets printed into the log file to be able to track the
origin of this down.

In future there should be a **final solution** to this bug:

  * either keep the current code (without the print) which converts the error
such that later the whole page gets processed in one part (fall back)
  * or add a loop with e.g. maximal 3 re-tries (like for low level url
retrieval) and then use e.g. the same fall back like before


You are receiving this mail because:
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to