Topic on Manual talk:Pywikibot

Uploading files with titles containing UTF-8 characters

5
Jc86035 (talkcontribs)

I was having trouble uploading python pwb.py upload.py -keep -noverify -ignorewarn "/…/BSicon hÜST.svg" narrow formations. Do I need to escape the Ü?

Xqt (talkcontribs)

No idea. A traceback would help to find out the problem.

Jc86035 (talkcontribs)

(Third comment in thread; had previous revisions suppressed)

ERROR: Traceback (most recent call last):
 File "/…/Documents/pywikibot/pywikibot/data/api.py", line 1558, in submit
   body=body, headers=headers)
 File "/…/Documents/pywikibot/pywikibot/tools/__init__.py", line 1105, in wrapper
   return obj(*__args, **__kw)
 File "/…/Documents/pywikibot/pywikibot/comms/http.py", line 279, in request
   r = fetch(baseuri, method, body, headers, **kwargs)
 File "/…/Documents/pywikibot/pywikibot/comms/http.py", line 381, in fetch
   error_handling_callback(request)
 File "/…/Documents/pywikibot/pywikibot/comms/http.py", line 297, in error_handling_callback
   raise request.data
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 884: ordinal not in range(128)
Xqt (talkcontribs)

Seems the traceback isn't complete. I propose to file a bug at phabricator:

Jc86035 (talkcontribs)

(I've tried changing multiple instances of "ascii" in the config files to "utf-8" but there was no effect.)