毕设web项目启动时,报错1
2
3 File "D:\Program Files (x86)\Python\lib\site-packages\django\db\backends\mysql\operations.py", line 146, in last_executed_query
query = query.decode(errors='replace')
AttributeError: 'str' object has no attribute 'decode'
找到错误代码(line146):query = query.encode(errors=’replace’)
解决方法:把decode改为encode即可。