On Wed, Dec 24, 2008 at 3:59 PM, greyw...@gmail.com <greyw...@gmail.com> wrote:
(snip)

> If I run testserver.py via the cmd prompt in Windows XP and then the
> testclient.py program, I get the following error:
>
> Traceback (most recent call last):
>  File "C:\Python30\testclient.py", line 12, in <module>
>    s.send('Hello world')               # send the data
> TypeError: send() argument 1 must be string or buffer, not str
>
> This happens in 2.6 or 3.0 and with different example client & server
> programs from the web.  What am I missing?

I'm sorry I should have answered sooner :)
Python 3.x (and probably 2.6+) required that you use
bytes to send your data through sockets rather than
strings. This was part of the revamp for better unicode
support irrc.

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

Reply via email to