current position:Home>When starting Django project, report attributeerror: 'STR' object has no attribute 'dcode‘

When starting Django project, report attributeerror: 'STR' object has no attribute 'dcode‘

2022-06-24 08:25:41weixin_ forty-six million three hundred and seventy-one thousan

Wrong presentation :

 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')

resolvent :

Click on the last file directory , Automatically enter this file :/home/lhz/.virtualenvs/python37_django/lib/python3.7/site-packages/django/db/backends/mysql/operations.py

# Will be the first 165 In a row decode Modified into encode,
if query is not None:
    query = query.decode(errors='replace')  
return query

copyright notice
author[weixin_ forty-six million three hundred and seventy-one thousan],Please bring the original link to reprint, thank you.
https://en.pythonmana.com/2022/175/202206240539166431.html

Random recommended