報錯提示:
File "/home/lhz/.virtualenvs/python37_django/lib/python3.7/site-packages/django/db/backends/mysql/operations.py", line 146, in last_executed_query
query = query.dcode(errors='replace')
解決方法:
點擊最後一個文件目錄,自動進入該文件中:/home/lhz/.virtualenvs/python37_django/lib/python3.7/site-packages/django/db/backends/mysql/operations.py
#將第165行中的decode修改成encode, if query is not None: query = query.decode(errors='replace') return query