[Twisted-web] Twisted Network Programming Essentials
Stephen Nightingale
j_s_nightingale at yahoo.co.uk
Mon Nov 21 17:59:18 MST 2005
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20051122/61119e7b/attachment.htm
More information about the Twisted-web
mailing list