为了账号安全,请及时绑定邮箱和手机立即绑定

Ubuntu中的Cherrypy json_out模块错误

Ubuntu中的Cherrypy json_out模块错误

HUH函数 2021-03-28 14:34:44
我试图让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服务器上进行部署,因此我希望尽快进行分类。
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 215 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号