当前位置:Gxlcms > 数据库问题 > create_access_token 之 "AttributeError: 'str' object has no attribute 'decode'"

create_access_token 之 "AttributeError: 'str' object has no attribute 'decode'"

时间:2021-07-01 10:21:17 帮助过:26人阅读

解决方案:

1、首先我想到的是版本是不是不一致呢?于是我查看本地与linux的flask_jwt_extended的版本,它们是一致的

2、字面上说是无法解码,那我就将参数做成可解码数据,然后就又抛出了另一个问题TypeError: Object of type ‘type‘ is not JSON serializable,接下来就是死循环了。。。

3、折腾了好几天,偶然翻到了官方介绍,说是3.14.0是老版本,于是抱着试一试的态度将版本升至最新版本3.25.0,竟然成功了

 

由此我得出一个结论,window与linux系统还是有轻微区别的,即便是表面上看起来一模一样

 

create_access_token 之 "AttributeError: 'str' object has no attribute 'decode'"

标签:attr   charm   解决方案   rgba   lin   循环   一模一样   err   使用   

人气教程排行