如何正确启动樱桃?它适用于我3.0,但现在我可以提供内容,但每次触摸源时都必须启动我的服务,即使自动重载器正在运行。
我已经添加了cherrypy.engine.block()
语句,该语句可以正常运行但是却停止为我的应用程序提供服务(在浏览器中没有答案,即使它正确打开了TCP端口)。
所有关于在哪里寻找或寻找什么的线索或见解?
这是在stdout上:
[30/Dec/2012:17:05:28] ENGINE Bus STARTING<br>
[30/Dec/2012:17:05:28] ENGINE Started monitor thread 'Autoreloader'.<br>
[30/Dec/2012:17:05:28] ENGINE Started monitor thread '_TimeoutMonitor'.<br>
[30/Dec/2012:17:05:28] ENGINE Serving on 0.0.0.0:8080<br>
[30/Dec/2012:17:05:28] ENGINE Bus STARTED<br>
[30/Dec/2012:17:05:28] ENGINE Bus STARTING<br>
[30/Dec/2012:17:05:28] ENGINE Monitor thread 'Autoreloader' already started.<br>
[30/Dec/2012:17:05:28] ENGINE Monitor thread '_TimeoutMonitor' already started.<br>
[30/Dec/2012:17:05:28] ENGINE Already serving on 0.0.0.0:8080<br>
[30/Dec/2012:17:05:28] ENGINE Bus STARTED<br>
cherrypy.tree.mount(login(), '/', configPath)<br>
cherrypy.tree.mount(reservation(), '/reservation', configPath)<br>
cherrypy.tree.mount(administration(), '/reservation/administration', configPath)<br>
cherrypy.server.socket_host= "0.0.0.0"<br>
cherrypy.engine.start()
答案 0 :(得分:1)
正如Makoto所说,看起来你已经开始两次CherryPy了。您是否同时使用cherrypy.quickstart调用engine.start / engine.block?如果是这样,请删除其中一个。
答案 1 :(得分:0)
我的问题是与python 3.3一起使用和旧版本(实际上是链接在他们网站上的最新版本!)。从bitbucket获取最新的软件包解决了这个问题!