老师您好,我保存不了地址
来源:16-3 申请免费https证书 和 上程序送审步骤
慕妹4270370
2019-07-15
首页图片正常显示 我连的是我服务器上的
老师帮我看看 什么原因
==========================================================
下面是日志
[root@iZbp1i0t9v2ixxhu5e9tewZ logs]# tail -f order.log
reraise(exc_type, exc_value, tb)
File "/root/data/www/python3_vir/lib/python3.5/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/root/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/root/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "./web/controllers/api/Address.py", line 110, in myAddressInfo
ValueError: invalid literal for int() with base 10: 'undefined'
[pid: 14873|app: 0|req: 99/1145] 183.195.23.207 () {48 vars in 978 bytes} [Mon Jul 15 18:23:18 2019] GET /api/my/address/info?id=undefined => generated 0 bytes in 9 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)
[2019-07-15 18:24:40,809] INFO in ApiAuthInterceptor: /api/my/address/set
2019-07-15 18:24:40,810 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)
2019-07-15 18:24:40,811 INFO sqlalchemy.engine.base.Engine SELECT member.id AS member_id, member.nickname AS member_nickname, member.mobile AS member_mobile, member.sex AS member_sex, member.avatar AS member_avatar, member.salt AS member_salt, member.reg_ip AS member_reg_ip, member.status AS member_status, member.updated_time AS member_updated_time, member.created_time AS member_created_time
FROM member
WHERE member.id = %s
LIMIT %s
2019-07-15 18:24:40,811 INFO sqlalchemy.engine.base.Engine ('1', 1)
[2019-07-15 18:24:40,812] INFO in ApiAuthInterceptor: <Member 1>
Traceback (most recent call last):
File "/root/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py", line 2463, in __call__
return self.wsgi_app(environ, start_response)
File "/root/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py", line 2449, in wsgi_app
response = self.handle_exception(e)
File "/root/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py", line 1866, in handle_exception
reraise(exc_type, exc_value, tb)
File "/root/data/www/python3_vir/lib/python3.5/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/root/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/root/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/root/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/root/data/www/python3_vir/lib/python3.5/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/root/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/root/data/www/python3_vir/lib/python3.5/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "./web/controllers/api/Address.py", line 34, in myAddressSet
ValueError: invalid literal for int() with base 10: 'undefined'
[pid: 14872|app: 0|req: 368/1146] 183.195.23.207 () {52 vars in 1018 bytes} [Mon Jul 15 18:24:40 2019] POST /api/my/address/set => generated 0 bytes in 9 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)
我的代码
# id = int(req['id']) if 'id' in req and req['id'] else 0
id = req['id'] if 'id' in req else 0
这两种都不行
===================
File “./web/controllers/api/Address.py”, line 110, in myAddressInfo 这个文件的110行是
req = request.values
我在这里怎么上传不了图片了老师
写回答
3回答
-
你直接截图出来保存的整个方法,你说的和报错完全对应不上
012019-07-15 -
编程浪子
2019-07-15
你好
File "./web/controllers/api/Address.py", line 110, in myAddressInfo 这个文件的110行是什么
还有错误已经很明显了,invalid literal for int() with base 10: 'undefined'
讲一个 undefined的值 使用int 转化内心肯定转化不了了的,必须是10进制的
00 -
编程浪子
2019-07-15
你好
502 后台代码错误,看后台命令行的报错信息
012019-07-15
相似问题
修改地址的问题
回答 2
为什么老师您那里有库存变更
回答 3