[IronPython] Bug in urllib?

Mike Raath raathm at gmail.com
Wed Jul 26 09:52:46 CEST 2006


I'm getting an error trying to use urllib - AttributeError: 'socket' object
has no attribute 'makefile' Using 1.0 RC1. Not sure if this has ever worked
- get NotImplementedError: getaddrinfo() is not currently implemented in the
Beta 9.

>>> import sys
>>> sys.path.append("C:\\Python24\\Lib")
>>> import urllib
>>> f = urllib.urlopen("http://www.microsoft.com")
Traceback (most recent call last):
  File , line 0, in <stdin>##151
  File C:\Python24\Lib\urllib.py, line 82, in urlopen
  File C:\Python24\Lib\urllib.py, line 194, in open
  File C:\Python24\Lib\urllib.py, line 316, in open_http
  File C:\Python24\Lib\httplib.py, line 1150, in getreply
  File C:\Python24\Lib\httplib.py, line 863, in getresponse
  File C:\Python24\Lib\httplib.py, line 275, in __init__
AttributeError: 'socket' object has no attribute 'makefile'

Same on CPython 2.4 gives:
>>> import sys
>>> sys.path.append("C:\\Python24\\Lib")
>>> import urllib
>>> f = urllib.urlopen("http://www.microsoft.com")
>>> print f.read()
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

<html dir="ltr" lang="en">
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8" >
<!--TOOLBAR_EXEMPT-->
(etc.....)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060726/646d7532/attachment.html>


More information about the Ironpython-users mailing list