Page MenuHomePhabricator

unicode error for upload.py
Closed, DeclinedPublic

Description

(From https://stackoverflow.com/questions/23799692/pywikipedia-unicode-error)

when using pywikipedia to upload an image on my wiki, I get the following error whatever the image:

$ python ./upload.py -noverify -keep ../converted/bcExtView_broker_53.jpg "Image uploaded by word2mediawiki (BOT)"
No handlers could be found for logger "pywiki"
Logging in to af:en as afbot via API.
Should be logged in now
Reading file ../converted/bcExtView_broker_53.jpg
The suggested description is:
Image uploaded by word2mediawiki (BOT)
Uploading image file to af:en via API....
ERROR: UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 687: ordinal not in range(128)
WARNING: Could not open 'http://dsiwikis/afWiki/api.php'. Maybe the server or
 your connection is down. Retrying in 1 minutes...

The last line is obviously an error as I can login...

Event Timeline

Nullzero raised the priority of this task from to Needs Triage.
Nullzero updated the task description. (Show Details)
Nullzero added a project: Pywikibot-compat.
Nullzero changed Security from none to None.
Nullzero subscribed.
Aklapper triaged this task as Lowest priority.Jun 5 2015, 1:41 PM
Aklapper subscribed.

Pywikibot has two versions: Compat and Core. This task was filed about the older version, called Pywikibot-compat, which is not under active development anymore. Hence I'm lowering the priority of this task to reflect the reality. Unfortunately, the Pywikibot team does not have the manpower to retest every single bug report / feature request against the (maintained) Pywikibot code base. Furthermore, the code base of Pywikibot-Compat has changed a lot compared to the code base of Pywikibot-Core so there is a chance that the problem described in this task might not exist anymore. Please help: Unfortunately manpower is limited and does not allow testing every single reported task again. If you have time and interest in Pywikibot, please upgrade to Pywikibot-Core and add a comment to this task if the problem in this task still happens in Pywikibot-Core (or directly edit the task by removing the Pywikibot-compat project and adding the Pywikibot project to this task). To learn more about Pywikibot and to get involved in its development, please check out https://www.mediawiki.org/wiki/Manual:Pywikibot/Development Thank you for your understanding.

Xqt subscribed.

Won't fix. Use core instead.