Last modified: 2014-09-02 00:54:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72241, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70241 - Exception on saving an item page
Exception on saving an item page
Status: RESOLVED DUPLICATE of bug 69664
Product: Pywikibot
Classification: Unclassified
Wikidata (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-31 22:38 UTC by Fabian
Modified: 2014-09-02 00:54 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Fabian 2014-08-31 22:38:16 UTC
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'>
Comment 1 Ricordisamoa 2014-09-02 00:54:47 UTC

*** This bug has been marked as a duplicate of bug 69664 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links