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 both fix this (but in different and
complementary ways).

For now, the easiest fix is opening your generated family file
(families/tropical_family.py) and removing the u in both u'
www.tropicalwikis.com' and u'/w'.

Merlijn


On 21 August 2013 11:36, AugurNZ <augu...@orcon.net.nz> wrote:

> 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 upload.py -family:tropical
> -keep -filename:Pwbicon.png -noverify Pwbicon.png "The Pywikipediabot
> icon"
> No handlers could be found for logger "pywiki"
> Reading file Pwbicon.png
> The suggested description is:
> The Pywikipediabot icon
> Uploading file to tropical:en via API....
> ERROR: UnicodeDecodeError: 'ascii' codec can't decode byte 0x89 in
> position 654: ordinal not in range(128)
> WARNING: Could not open 'http://www.tropicalwikis.com/w/api.php'. Maybe
> the server or
>  your connection is down. Retrying in 1 minutes...
> ----------
>
> I can perform other actions on www.tropicalwikis.com with my bot, such as
> using login.py, replace.py etc. I have also tried using a different
> -family: and logging in to www.thetestwiki.org (where I also have a valid
> bot account) and tried uploading the image file there, with the same
> result.
>
> I'm not a python expert, in fact I'm barely a python novice. I came across
> this information which may be relevant though...
> http://wiki.python.org/moin/UnicodeDecodeError
>
> Thanks.
> AugurNZ
>
> ps. sorry if this is a repeat of a previous message. I wasn't registered
> on the list when I first sent this, but I am now.
>
>
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to