Django2.2序列化 ‘str‘ object has no attribute ‘decode‘

 AttributeError: 'str' object has no attribute 'decode'

解决方案:

找到django的安装目录:/usr/local/lib/python3.6/site-packages/django/db/backends/mysql

vim operations.py   找到

query.decode 改为query.encode 

猜你喜欢

转载自blog.csdn.net/xiaofeixia666888/article/details/127108771