django error

Reason: Since mysqlclient currently does not support high-level python, after this error occurs, you can find the file location according to the error prompt, open the base.py file, find the following code and comment it out:

version = Database.version_info
if version < (1, 3, 13):
    raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.__version__)

 

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

Reason: The difference between python3.5 and Python2.7 in the decoding of socket return value 
python in two types conversion of bytes and str, the required functions are encode (), decode ()

Solution: change decode to encode

Guess you like

Origin www.cnblogs.com/wangchao688/p/12677660.html