Page MenuHomePhabricator

pywikibot UploadRobot not working in python3
Closed, ResolvedPublic


When I run the UploadRobot from from the pywikibot-core I get the following error:

ERROR: Upload error:
Traceback (most recent call last):

File "../..\pywikibot\", line 407, in upload_file
  temp = self.read_file_content(file_url)
File "../..\pywikibot\", line 150, in read_file_content
  content_len ='Content-Length')

AttributeError: 'HTTPMessage' object has no attribute 'getheader'

Changing ( .getheader to .get in lines 145, 150 and 151 solves the issue.

Not sure if that breaks the functionality for python 2 or whether that creates any other issues


Related Gerrit Patches:

Event Timeline

Basvb created this task.Mar 26 2017, 3:03 PM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptMar 26 2017, 3:03 PM
Xqt triaged this task as High priority.Mar 26 2017, 3:59 PM
Xqt added a subscriber: Xqt.

Looks like this issue.

Xqt claimed this task.Mar 26 2017, 4:25 PM

Change 344829 had a related patch set uploaded (by Xqt):
[pywikibot/core@master] [bugfix] Enable for PY3

Change 344829 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Enable for PY3

Xqt closed this task as Resolved.Mar 26 2017, 6:29 PM