Bugs item #3153555, was opened at 2011-01-09 09:33
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=315355…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Tgr (tgr_)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unicode error when handling non-ASCII network errors
Initial Comment:
The error handler for Site.postData in wikipedia.py line 5248 (in r8821) casts an
exception to a string:
except Exception, e:
output(u'%s' %e)
This will fail with a UnicodeDecodeError if the exception message contains non-ASCII
characters (which is often the case for network error messages on non-English Windows).
Pywikipedia [http] trunk/pywikipedia (r8821, 2011/01/06, 22:01:33)
Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
unicode test: triggers problem #3081100
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2011-07-31 04:08
Message:
U0lsBz <a
href="http://hyziawptyvnv.com/">hyziawptyvnv</a>iawptyvnv</a>,
[
url=http://bnhjzecrcszs.com/]bnhjzecrcszs[/url],
[
link=http://khglvbxlqlyd.com/]khglvbxlqlyd[/link],
http://tzxxnbjixiqt.com/
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2011-06-22 19:51
Message:
dpdGAI <a
href="http://fechymsuggnt.com/">fechymsuggnt</a>hymsuggnt</a>,
[
url=http://kmsfjqdruizn.com/]kmsfjqdruizn[/url],
[
link=http://rvfrfsruaemj.com/]rvfrfsruaemj[/link],
http://tjpffrxsfrts.com/
----------------------------------------------------------------------
Comment By: Tgr (tgr_)
Date: 2011-01-09 13:59
Message:
Hungarian Windows, codepage 852
%r gives
URLError(error(10054, 'A l\xe9tez\xf5 kapcsolatot a t\xe1voli
\xe1llom\xe1s k\xe9nyszer\xedtetten bez\xe1rta'),)
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2011-01-09 10:33
Message:
Can you reproduce the problem?
If so, please change output(u"%s" % e) to output(u"%r"% e) and add a
comment with the output you get. Additionally, please tell us what code
page you are using (run 'chcp' in a dos box) and the language of your
windows version.
Thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=315355…