https://bugzilla.wikimedia.org/show_bug.cgi?id=62119
Bug ID: 62119
Summary: Bot crashes on malllformed coordinates api output
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: [email protected]
Reporter: [email protected]
Web browser: ---
Mobile Platform: ---
We ask the api for the name, but it isn't actually returned at
https://pl.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=Bamb%C3%BA_%28metro_w_Madrycie%29&coprop=type|name|dim|country|region|globe&format=json
File "C:\pywikibot\core\pywikibot\page.py", line 1164, in coordinates
self.site.loadcoordinfo(self)
File "C:\pywikibot\core\pywikibot\site.py", line 1369, in loadcoordinfo
api.update_page(page, pageitem)
File "C:\pywikibot\core\pywikibot\data\api.py", line 1009, in update_page
name=co['name'],
KeyError: 'name'
<type 'exceptions.KeyError'>
Filed an api bug at https://bugzilla.wikimedia.org/show_bug.cgi?id=62118 , but
we should probably patch up the bot too to be able to handle missing
properties.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l