django运行报错TypeError: object supporting the buffer API required

Django project run error: TypeError: object supporting the buffer API required

 

 solution:

 

 The password string format into the database settings.py

Source:

def scramble_caching_sha2(password, nonce):
    # (bytes, bytes) -> bytes
    """Scramble algorithm used in cached_sha2_password fast path.

    XOR(SHA256(password), SHA256(SHA256(SHA256(password)), nonce))
    """
    if not password:
        return b''

    p1 = hashlib.sha256(password).digest()

 

 

It requires a password must be a string

Guess you like

Origin www.cnblogs.com/pfeiliu/p/11921534.html