Fine Book.  I'm working through the examples.
Hit a problem with the wordcountproxy.py example,
under the explanation of HTTP Proxy Servers, on page 62..
As this __might__ be an issue with Twisted itself,
I'm cross-posting here as well as back to O'Reilly errata.

The issue is that the:
'reactor.listenTCP(WEB_PORT, WebReportFactory(counter))'
call precipitates an error message in  _getfullpathname in
Lib/ntpath.py, called from web/http.py, and the error is:
'TypeError: coercing to Unicode: need string or buffer, WordCounter found'

The full traceback is given below.  N.B. I'm using Python 2.4.1
on Win XP.

I wonder if anyone else has come across this issue?
Any insights gratefully received,

Regards,

Stephen Nightingale.

2005/11/21 23:20 GMT Standard Time [-] Log opened.
2005/11/21 23:20 GMT Standard Time [-] __main__.WordCountProxyFactory starting on 8001
2005/11/21 23:20 GMT Standard Time [-] Starting factory <__main__.WordCountProxyFactory instance at 0x00F03878>
2005/11/21 23:20 GMT Standard Time [-] Traceback (most recent call last):
2005/11/21 23:20 GMT Standard Time [-]   File "wordcountproxy.py", line 137, in ?
2005/11/21 23:20 GMT Standard Time [-]     reactor.listenTCP(WEB_PORT, WebReportFactory(counter))
2005/11/21 23:20 GMT Standard Time [-]   File "D:\Python\Lib\site-packages\twisted\web\http.py", line 1086, in __init__
2005/11/21 23:20 GMT Standard Time [-]     logPath = os.path.abspath(logPath)
2005/11/21 23:20 GMT Standard Time [-]   File "d:\Python\lib\ntpath.py", line 500, in abspath
2005/11/21 23:20 GMT Standard Time [-]     path = _getfullpathname(path)
2005/11/21 23:20 GMT Standard Time [-] TypeError: coercing to Unicode: need string or buffer, WordCounter found


To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.
_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to