bottle json issure

解决Bottle框架中JSON使用及权限问题
本文讨论了在使用Bottle框架时遇到的JSON相关错误和权限问题,提出了通过从特定库导入JSON并修改文件权限来解决这些问题的方法,并强调了在不同端口运行Bottle时可能需要的额外权限。
i want use my json lib in bottle,but encouter some error as follows:
function not has write attribute,
i think the problem is bottle also contain a class named json,
so i use from lib import json as jsonpy replace,it fix a part,
another problem is some operate need write permission so we need chmod 777 web.py to give the write permission.

in default bottle catch all excpetion,so we can't see where is the issue,config as follows:
bottle.debug(True)

myapp = bottle.default_app() # or bottle.app() since 0.7
myapp.catchall = False

bottle.run(host='localhost',port=8080,reloader=True)
if you run bottle on 80 port ,you need sudo python web.py(you need root permission)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值