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

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

 解决方案:

 将settings.py中数据库的密码改成字符串格式

源码:

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

扫描二维码关注公众号,回复: 7959308 查看本文章

要求密码需为字符串形式

猜你喜欢

转载自www.cnblogs.com/pfeiliu/p/11921534.html
今日推荐