https://bugzilla.wikimedia.org/show_bug.cgi?id=59525

       Web browser: ---
            Bug ID: 59525
           Summary: DRTRIGON-90 sequence of sometimes occuring "KeyError:
                    u'parse'"
           Product: Tool Labs tools
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: Unprioritized
         Component: DrTrigonBot - General
          Assignee: wmf.bugconver...@gmail.com
          Reporter: wmf.bugconver...@gmail.com
    Classification: Unclassified
   Mobile Platform: ---

This issue was converted from https://jira.toolserver.org/browse/DRTRIGON-90.
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 <dr.tri...@surfeu.ch>

-------------------------------------------------------------------------------
From: drtrigon <dr.tri...@surfeu.ch>
Date: Sat, 09 Jul 2011 11:14:57
-------------------------------------------------------------------------------

The error:

> Traceback (most recent call last):  
File "/home/drtrigon/pywikipedia/bot_control.py", line 225, in run  
self.bot.main()  
File "/home/drtrigon/pywikipedia/sum_disc.py", line 1307, in main  
bot.run()  
File "/home/drtrigon/pywikipedia/sum_disc.py", line 369, in run  
self.getLatestRelevantNews()  
File "/home/drtrigon/pywikipedia/sum_disc.py", line 747, in
getLatestRelevantNews  
entries = PageSections(page, self._param)  
File "/home/drtrigon/pywikipedia/sum_disc.py", line 1138, in __init__  
sections = page.getSections(minLevel=1)  
File "/home/drtrigon/pywikipedia/dtbext/dtbext_wikipedia.py", line 50, in
<lambda>  
obj.__dict__[\'getSections\'] = lambda *args, **kwds:
Page.__dict__[\'getSections\'](obj, *args, **kwds)  
File "/home/drtrigon/pywikipedia/dtbext/dtbext_wikipedia.py", line 160, in
getSections  
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

[1]
http://de.wikipedia.org/w/index.php?title=Benutzer:DrTrigonBot/Status&direction=prev&oldid=90413407

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to