I was running the HTTP GET example at
http://www.python.org/doc/current/lib/httplib-examples.html and ran
into a bit of trouble...

>>> import httplib  # This works.
>>> conn = httplib.HTTPConnection("www.python.org")  # This works.
>>> conn.request("GET", "/index.html")  # This does not work...

The errors I get are below. Any suggestions on how to get rid of the
errors? Thanks!

# Begin errors...
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/httplib.py", line 801, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.4/httplib.py", line 818, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python2.4/httplib.py", line 749, in putrequest
    self.putheader('Host', self.host.encode("idna"))
  File "/usr/lib/python2.4/encodings/__init__.py", line 96, in
search_function
    globals(), locals(), _import_tail)
  File "/usr/lib/python2.4/encodings/idna.py", line 6, in ?
    dots = re.compile(u"[\u002E\u3002\uFF0E\uFF61]")
  File "/usr/lib/python2.4/sre.py", line 180, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.4/sre.py", line 225, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/lib/python2.4/sre_compile.py", line 500, in compile
    code = _code(p, flags)
  File "/usr/lib/python2.4/sre_compile.py", line 481, in _code
    _compile_info(code, p, flags)
  File "/usr/lib/python2.4/sre_compile.py", line 459, in _compile_info
    _compile_charset(charset, flags, code)
  File "/usr/lib/python2.4/sre_compile.py", line 178, in
_compile_charset
    for op, av in _optimize_charset(charset, fixup):
  File "/usr/lib/python2.4/sre_compile.py", line 221, in
_optimize_charset
    return _optimize_unicode(charset, fixup)
  File "/usr/lib/python2.4/sre_compile.py", line 341, in
_optimize_unicode
    mapping = array.array('b', mapping).tostring()

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to