[Pywikipedia-l] ascii encode error in upload.py

2013-08-21 Thread AugurNZ
Hi, I was pointed here from #pywikipediabot on Freenode IRC. I am using Pywikipediabot (trunk) revision 11781 under Ubuntu 12.04. I'm having no success using the upload.py script. It keeps failing with the following error message... -- augur@ubuntu:/home/augur/pywikipedia# python

Re: [Pywikipedia-l] ascii encode error in upload.py

2013-08-21 Thread AugurNZ
The file I'm trying to upload is the *.png thumbnail of the Pywikipediabot logo from this page... http://www.mediawiki.org/wiki/File:Pwb_icon.svg The thumbnail is called http://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Pwb_icon.svg/128px-Pwb_icon.svg.png but I have shortened the filename,

Re: [Pywikipedia-l] ascii encode error in upload.py

2013-08-21 Thread Amir Ladsgroup
can you run it in debugging mode? I mean add -v to the code: python upload.py -family:tropical -keep -filename:Pwbicon.png -noverify Pwbicon.png The Pywikipediabot icon -v Best On Wed, Aug 21, 2013 at 2:49 PM, AugurNZ augu...@orcon.net.nz wrote: The file I'm trying to upload is the *.png

Re: [Pywikipedia-l] ascii encode error in upload.py

2013-08-21 Thread AugurNZ
I have done that now, and uploaded the results as a Gist on GitHub... https://gist.github.com/AugurNZ/6294530 can you run it in debugging mode? I mean add -v to the code: python upload.py -family:tropical -keep -filename:Pwbicon.png -noverify Pwbicon.png The Pywikipediabot icon -v Best On

Re: [Pywikipedia-l] ascii encode error in upload.py

2013-08-21 Thread AugurNZ
I have done that now, and the error message comes back exactly the same as it did prior to this change. Lines 83 to 86 of my upload.py file are shown below, after the change you suggested... 83 class UploadRobot: 84 def __init__(self, url, urlEncoding='utf-8', description=u'', 85

Re: [Pywikipedia-l] ascii encode error in upload.py

2013-08-21 Thread AugurNZ
That worked perfectly, thank you Merlijn. It was a bug on our end - we were incorrectly handling urls, which caused python to try and interpret the image data as text. Not surprisingly, this results in errors. https://gerrit.wikimedia.org/r/80228 and https://gerrit.wikimedia.org/r/80229