Page MenuHomePhabricator

broken Page().text ?
Closed, ResolvedPublic


Looks like a critical bug in pywikibot? (pywikibot-core updated today from github, Python 3.4.3)

>>> import pywikibot
>>> site = pywikibot.Site()
>>> site
APISite("pl", "wiktionary")
>>> page = pywikibot.Page(site, 'dog')
>>> page.text
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../pywikibot/core/pywikibot/", line 503, in text
    self._text = self.get(get_redirect=True)
  File ".../pywikibot/core/pywikibot/tools/", line 1327, in wrapper
    return obj(*__args, **__kw)
  File ".../pywikibot/core/pywikibot/", line 370, in get
  File ".../pywikibot/core/pywikibot/", line 400, in _getInternals, getText=True, sysop=sysop)
  File ".../pywikibot/core/pywikibot/", line 3751, in loadrevisions
    for pagedata in rvgen:
  File ".../pywikibot/core/pywikibot/data/", line 2726, in __iter__ = self.request.submit()
  File ".../pywikibot/core/pywikibot/data/", line 1913, in submit
    paramstring = self._http_param_string()
  File ".../pywikibot/core/pywikibot/data/", line 1767, in _http_param_string
    return encode_url(self._encoded_items())
  File ".../pywikibot/core/pywikibot/data/", line 3051, in encode_url
    query.sort(key=lambda x: x[0].lower().endswith('token') +
AttributeError: 'dict_items' object has no attribute 'sort'

family = 'wiktionary'
mylang = 'pl'
usernames['wiktionary']['pl'] = u'AlkamidBot'

Event Timeline

Alkamid raised the priority of this task from to Needs Triage.
Alkamid updated the task description. (Show Details)
Alkamid added a project: Pywikibot.
Alkamid added a subscriber: Alkamid.

Change 258683 had a related patch set uploaded (by John Vandenberg):
Fix encode_url dict support on Python 3

Change 258683 merged by jenkins-bot:
Fix encode_url dict support on Python 3

Mpaa set Security to None.