Solution:
The above problem occurs find: Python37\lib\site-packages\django\db\backends\mysql\operations.py".
Open and modify the inside: query = query.decode(errors='replace') to query = query.encode(errors='replace') and you're done.
vim /usr/local/python3/lib/python3.6/site-packages/django/db/backends/mysql/operations.py
query = query.decode(errors='replace') Change to: query = query.encode(errors='replace')
Similar Posts:
- [Solved] python3.7+django2.2 Error: AttributeError: ‘str’ object has no attribute ‘decode’
- [Solved] Djiango Create Migrations Error: query = query.decode(errors=’replace’) AttributeError: ‘str’ object has no attribute ‘decode’
- Python3.x Error:AttributeError: ‘str’ object has no attribute ‘decode’
- Django: How to Solve Using Pymysql Error
- Python AttributeError: ‘unicode’ object has no attribute ‘tzinfo’
- ImportError: No module named pytz
- [Solved] Runtime Warning: Font Glyph 20108 is missing. Font.set Fu text (s,0.0,flags=flags), RuntimeWarningGlyph20108missingfromcurrentfontfontsettexts00flagsflags
- django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named ‘M…
- Django startup error: generator expression must be parentized
- Error: need RCPT command