Incompatibility between socket and httplib in python CVS build.

Petru Paler ppetru at coltronix.com
Wed Mar 29 11:54:48 EST 2000


On Wed, Mar 29, 2000 at 11:40:42AM -0500, Alex wrote:
> Hi.  Running python httplib.py currently gives the following error
> message:
> 
> arc% python httplib.py
> testing HTTP...
> Traceback (innermost last):
>   File "httplib.py", line 272, in ?
>     test()
>   File "httplib.py", line 238, in test
>     h.connect(host)
>   File "httplib.py", line 112, in connect
>     self.sock.connect(host, port)
> TypeError: connect requires exactly 1 argument; 2 given

   Try replacing it with

self.sock.connect((host, port))

   and it should work.

-Petru




More information about the Python-list mailing list