1

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

ERROR: UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 687: ordinal not in range(128)

information on my envt:

frproasi01(elan)[ /coface/wikis/www/mw/pywikipedia ] python version.py
Pywikipedia [http] trunk/pywikipedia (r11775, 2013/07/20, 11:39:29, n/a)
Python 2.7.6 (default, Apr 17 2014, 10:38:03)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok

It shows that unicde is set correctly.

The whole error is:

$ 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...

Any help on this error on which I'm banging my head since one week would be greatly appreciated...

leppie
  • 115,091
  • 17
  • 196
  • 297
Olivier
  • 252
  • 2
  • 11

1 Answers1

0

That phabricator task was declined because this Version of pywikibot (compat release) is very outdated and no longer supported. Please update youe pywikibot package.

xqt
  • 280
  • 1
  • 11