原文:TypeError: Object of type 'int32' is not JSON serializable ——已解决

将模型用flask封装,返回json时报错:TypeError: Object of type int is not JSON serializable 网上搜索出的解决方案:重写json.JSONEncoder ...

2018-09-06 11:08 0 7091 推荐指数:

查看详情

TypeError: Object of type 'int64' is not JSON serializable

错误类型:TypeError: Object of type 'int64' is not JSON serializable 错误场景:对Numpy和Pandas结果进行json.dumps报错 错误分析:1. python3中没有int64这个数据类型,所有的整型都是int 2. 报错里 ...

Fri Mar 29 22:40:00 CST 2019 0 2396
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM