[Chicago] UnicodeDecodeError When compiling BitTorrent in BitTornado
jolley84 at yahoo.com.cn
Sun Oct 8 06:13:04 CEST 2006
hello guys, i have a problem that when i compile one of bittornado source file named:btdownloadgui.py and i get such a error message:
BitTorrent T-0.3.15 (BitTornado)
Python version: 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)]
wxWindows version: 18.104.22.168
Traceback (most recent call last):
File "C:\BitTornado-0.3.15\BitTornado-CVS\btdownloadgui.py", line 2334, in _next
savedas = dow.saveAs(choosefile, d.newpath)
File "C:\BitTornado-0.3.15\BitTornado-CVS\BitTornado\download_bt1.py", line 409, in saveAs
if path.exists(path.join(file, x['path'])):
File "C:\Python24\lib\ntpath.py", line 102, in join
path += "\\" + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb9 in position 1: ordinal not in range(128)
of those errors: one is from bittornado source file btdownloadgui.py itself,and one is from the the bittornado library,also one is from the python library. weird,isn't it?
later i get something more about bittorrent encodings and decodings,utf-8,utf-16,ascii,latin.etc.and i try almost all of these decodings and encodings,such as use decode('utf-8'),or encode('utf-16')etc.and those doings donot come out effectively.
later i use
from sys import getfilesystemencoding
ENCODING = getfilesystemencoding()
from sys import getdefaultencoding
ENCODING = getdefaultencoding()
in the btdowngui.py source file,however the bug remains.
does it means the bittornado library or the python library itself is misleading?
the webpage is at http://www.python-forum.org/py/viewtopic.php?t=1910 if you prefer to read in HTML format.
and also i attempt to update the python and wxWidgets version,but in vain.
thanks if anyone can be useful.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chicago