我试图让Cherrypy为项目输出json,并且在我的Mac上添加@ cherrpy.tools.json_out()装饰器正在工作,但是在我的Ubuntu 13.04系统上却出现此错误。Traceback (most recent call last): File "cherrypy.py", line 1, in <module> import cherrypy File "/bla/cherrypy.py", line 4, in <module> class Root(object): File "/bla/cherrypy.py", line 6, in Root @cherrypy.tools.json_out()AttributeError: 'module' object has no attribute 'tools'上面的代码是此页面底部的直接副本。 http://tools.cherrypy.org/wiki/JSON如果我输入python shell,然后在模块上运行交互式帮助,则会得到类似的结果。help> cherrypyproblem in cherrypy - <type 'exceptions.AttributeError'>: 'module' object has no attribute 'tools'我尝试搜索,但是找不到其他遇到相同问题的人吗?(也许我错过了树木的木头?)我已经尝试通过apt重新安装软件包,并手动从cherrypy源手动安装了所有针对python 2.7的软件包尽管我在Mac和Ubuntu上进行开发,但是我将在Ubuntu服务器上进行部署,因此我希望尽快进行分类。
添加回答
举报
0/150
提交
取消