the JSON object must be str, not 'bytes'
2024-09-07 19:57:41
{ "ErrorDump": "the JSON object must be str, not 'bytes'", "StatusCode": "500" }
response = clt.do_action_with_exception(request___)
## { "ErrorDump": "the JSON object must be str, not 'bytes'", "StatusCode": "500" }
# text = json.loads(response) win ok linux + .decode('utf-8') 加后 win 依然ok
text = json.loads(response.decode('utf-8')) stsDict = dict().fromkeys(['RequestId', 'uid', 'Expiration', 'SecurityToken', 'StatusCode'])
stsDict["RequestId"] = text["RequestId"]
stsDict["uid"] = uid
stsDict['Expiration'] = text["Credentials"]['Expiration']
stsDict['SecurityToken'] = text["Credentials"]['SecurityToken']
stsDict["StatusCode"] = "200"
最新文章
- js 中关联数组
- .NET中的yield关键字
- Oracle补习班第三天
- iOS emoji表情转码 或者判断
- HTML内容整理
- 【MongoBD】MongoBD持久化
- Linux 命令 alternatives和update-alternatives
- python学习笔记30(全局变量的两种解决办法)
- overload and overwrite in C++
- Unity入门
- 2017最新技术java高级架构、千万高并发、分布式集群、架构师入门到精通视频教程
- Codeforces 828B Black Square(简单题)
- 逆波兰表达式(RPN)算法简单实现
- 几条常见的数据库分页 SQL 语句
- 多项式的基本运算(FFT和NTT)总结
- Excel实现双击插入当前日期时间
- shell重定向(大于号,小于号,左右,2>;&;1,&;)
- python之定义类创建实例
- DispatcherServlet 的创建过程
- DevOps - CI - 持续集成(Continuous Integration)