https://bugzilla.wikimedia.org/show_bug.cgi?id=70241
Bug ID: 70241 Summary: Exception on saving an item page Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: Wikidata Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: CommodoreFabianus@gmx.de Web browser: --- Mobile Platform: ---
When I try to save a wikidata item the following exception occurs:
import pywikibot d = pywikibot.getSite('test', 'wikidata').data_repository() i = pywikibot.page.ItemPage(d, 'Q6') i.save()
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pywikibot/tools.py", line 310, in wrapper return method(*__args, **__kw) File "pywikibot/page.py", line 953, in save if not force and not self.botMayEdit(): File "pywikibot/page.py", line 882, in botMayEdit templates = self.templatesWithParams() File "pywikibot/tools.py", line 310, in wrapper return method(*__args, **__kw) File "pywikibot/page.py", line 1256, in templatesWithParams templates = textlib.extract_templates_and_params(self.text) File "pywikibot/textlib.py", line 924, in extract_templates_and_params return extract_templates_and_params_regex(text) File "pywikibot/textlib.py", line 944, in extract_templates_and_params_regex thistxt = removeDisabledParts(text) File "pywikibot/textlib.py", line 294, in removeDisabledParts return toRemoveR.sub('', text) TypeError: expected string or buffer
type(i.text)
<type 'dict'>