TypeError: Object of type bytes is not JSON serializable:中文翻译bytes不能正常json序列化?
错误截图:
后来发现是前面的代码没把数据的<class 'bytes'>转为str.
print(token, type(token))
str2 = str(token, encoding="utf-8")
TypeError: Object of type bytes is not JSON serializable:中文翻译bytes不能正常json序列化?
错误截图:
后来发现是前面的代码没把数据的<class 'bytes'>转为str.
print(token, type(token))
str2 = str(token, encoding="utf-8")