Type error: object supporting the buffer API required
Solution:
Change the password of database in settings.py to string format
Source code:
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()
The password must be in the form of string
Similar Posts:
- [Solved] Python hashlib MD5 Error: TypeError: Unicode-objects must be encoded before hashing
- Python TypeError: not all arguments converted during string formatting
- Error reporting and resolution of Python 3 using binascii method
- Get the time value from the database and report an error: Java sql. Timestamp cannot be cast to java. lang.Long
- [Solved] java.lang.IllegalArgumentException: Cannot format given Object as a Date
- TypeError: strptime() argument 1 must be str, not bytes
- Pycharm Connect MySQL to Find Sheet Error: RuntimeError: ‘cryptography’ package is required for sha256_password or caching_sha2_password auth methods
- [Solved] exception is java.lang.NoClassDefFoundError: com.sun.crypto.provider.SunJCE
- [Solved] SQLyog Connect MYSQL Error: 2058 plugin caching_sha2_password could not be loaded
- Elasticsearch error mapper_ parsing_ exception