[Chicago] UnicodeDecodeError When compiling BitTorrent in BitTornado

=?gb2312?q?=B7=C5=DC=F8=20=CC=B8?= 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: 
    Code: [Download]    
   BitTorrent T-0.3.15 (BitTornado)   
   OS: win32   
   Python version: 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)]   
   wxWindows version:   
   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'][0])):   
     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 
    Code: [Download]    
       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.
so help. 
thanks if anyone can be useful. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/chicago/attachments/20061008/1fcac0de/attachment.htm 

More information about the Chicago mailing list