[IronPython] Can not use httplib in ironpython beta9?
peter lin
dingyi.lin at gmail.com
Tue Jul 18 11:03:28 CEST 2006
After reading the tutorial I think it's ok to use httplib, so I write a test
code
to test it with ipy.
I just cannot let it run ok with ipy.
Is something wrong I have done?
My test code as follows
import sys
sys.path.append(r"c:\python24\lib")
import httplib
conn = httplib.HTTPConnection('www.pchome.com.tw')
conn.request("GET", "/index.html")
r1 = conn.getresponse()
if r1.status==200:
print r1.read()
Here is the error I found when use ipy.exe
Traceback (most recent call last):
File c:\dev_tool\IronPython-1.0-Beta9\rsslibtest.py, line 23, in
Initialize
File c:\python24\lib\httplib.py, line 810, in request
File c:\python24\lib\httplib.py, line 821, in _send_request
File c:\python24\lib\httplib.py, line 752, in putrequest
File , line 0, in Encode##71
LookupError: unknown encoding: idna
but it runs ok and gets the response when i use python.exe to run my test py
code
(remove two lines
import sys
sys.path.append(r"c:\python24\lib")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060718/0a1a69a8/attachment.html>
More information about the Ironpython-users
mailing list