| Basvb created this task. Basvb added a project: Pywikibot-core. Herald added subscribers: pywikibot-bugs-list, Aklapper. |
TASK DESCRIPTION
When I run the UploadRobot from specialbots.py from the pywikibot-core I get the following error:
ERROR: Upload error:
Traceback (most recent call last):
File "../..\pywikibot\specialbots.py", line 407, in upload_file
temp = self.read_file_content(file_url)
File "../..\pywikibot\specialbots.py", line 150, in read_file_content
content_len = infile.info().getheader('Content-Length')AttributeError: 'HTTPMessage' object has no attribute 'getheader'
Changing (https://github.com/wikimedia/pywikibot-core/blob/master/pywikibot/specialbots.py#L145) .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
TASK DETAIL
EMAIL PREFERENCES
To: Basvb
Cc: Aklapper, pywikibot-bugs-list, Basvb, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Sn1per, jayvdb, Dalba, Masti, Alchimista, Rxy
Cc: Aklapper, pywikibot-bugs-list, Basvb, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Sn1per, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
