原文:django项目启动时报 'str' object has no attribute 'decode'

今天在启动django项目是报错AttributeError: str object has no attribute decode , 项目连接数据库时,出现这个错误,报错截图 处理过程: 点击最后一个报错信息,进入到下面这个页面 处理结果: 将上图用红色印记圈起来的代码直接注释掉,或者将代码里面的decode直接变为encode,这样的话项目就会正常启动,并且不会报错 ...

2021-02-20 22:46 0 405 推荐指数:

查看详情

python2 'str' object has no attribute 'decode'

上述代码,报错: 'str' object has no attribute 'decode' 查找原因: https://stackoverflow.com/questions/29030725/str-object-has-no-attribute-decode You ...

Sat Apr 28 02:54:00 CST 2018 0 10040
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM