import cherrypy
class HelloWorld:
def index(self):
return "Hello world!"
index.exposed = True
cherrypy.quickstart(HelloWorld())
Microsoft Windows XP [Версия 5.1.2600]
(С) Корпорация Майкрософт, 1985-2001.
d:\python>test.py
[15/Oct/2010:08:56:13] ENGINE Listening for SIGTERM.
[15/Oct/2010:08:56:13] ENGINE Bus STARTING
CherryPy Checker:
The Application mounted at '' has an empty config.
[15/Oct/2010:08:56:13] ENGINE Started monitor thread 'Autoreloader'.
[15/Oct/2010:08:56:13] ENGINE Started monitor thread '_TimeoutMonitor'.
[15/Oct/2010:08:56:14] ENGINE Serving on 127.0.0.1:8080
[15/Oct/2010:08:56:14] ENGINE Bus STARTED
[15/Oct/2010:08:56:14] ENGINE Error in HTTP server: shutting down
Traceback (most recent call last):
File "C:\Python31\lib\site-packages\cherrypy\process\servers.py", line 75, in _start_http_thread
self.httpserver.start()
File "C:\Python31\lib\site-packages\cherrypy\wsgiserver\__init__.py", line 1343, in start
self.tick()
File "C:\Python31\lib\site-packages\cherrypy\wsgiserver\__init__.py", line 1417, in tick
conn = self.ConnectionClass(self, s, makefile)
File "C:\Python31\lib\site-packages\cherrypy\wsgiserver\__init__.py", line 911, in __init__
self.rfile = makefile(sock, "rb", self.rbufsize)
File "C:\Python31\lib\site-packages\cherrypy\wsgiserver\__init__.py", line 890, in CP_makefile
return io.BufferedReader(socket.SocketIO(sock, mode), bufsize)
File "C:\Python31\lib\_pyio.py", line 885, in __init__
raise ValueError("invalid buffer size")
ValueError: invalid buffer size
[15/Oct/2010:08:56:14] ENGINE Bus STOPPING
[15/Oct/2010:08:56:14] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('127.0.0.1', 8080)) shut down
[15/Oct/2010:08:56:14] ENGINE Stopped thread '_TimeoutMonitor'.
[15/Oct/2010:08:56:14] ENGINE Stopped thread 'Autoreloader'.
[15/Oct/2010:08:56:14] ENGINE Bus STOPPED
[15/Oct/2010:08:56:14] ENGINE Bus EXITING
[15/Oct/2010:08:56:14] ENGINE Bus EXITED
Exception in thread HTTPServer Thread-3:
Traceback (most recent call last):
File "C:\Python31\lib\threading.py", line 516, in _bootstrap_inner
self.run()
File "C:\Python31\lib\threading.py", line 469, in run
self._target(*self._args, **self._kwargs)
File "C:\Python31\lib\site-packages\cherrypy\process\servers.py", line 75, in _start_http_thread
self.httpserver.start()
File "C:\Python31\lib\site-packages\cherrypy\wsgiserver\__init__.py", line 1343, in start
self.tick()
File "C:\Python31\lib\site-packages\cherrypy\wsgiserver\__init__.py", line 1417, in tick
conn = self.ConnectionClass(self, s, makefile)
File "C:\Python31\lib\site-packages\cherrypy\wsgiserver\__init__.py", line 911, in __init__
self.rfile = makefile(sock, "rb", self.rbufsize)
File "C:\Python31\lib\site-packages\cherrypy\wsgiserver\__init__.py", line 890, in CP_makefile
return io.BufferedReader(socket.SocketIO(sock, mode), bufsize)
File "C:\Python31\lib\_pyio.py", line 885, in __init__
raise ValueError("invalid buffer size")
ValueError: invalid buffer size
[15/Oct/2010:08:56:14] ENGINE Waiting for child threads to terminate...
d:\python>
Что я делаю не так, и как надо?