执行: python manage.py makemigrations报AttributeError: 'str' object has no attribute 'decode'

找到错误代码(line146):query = query.encode(errors='replace')

解决方法:把decode改为encode即可。

posted @ 2019-04-24 09:53  qiao1234  阅读(963)  评论(0编辑  收藏  举报