error.log.2022-07-21 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. 2021-10-24 19:06:37,939 - D:\git_workspace\sanoh\G01_0345\sql.py[line:24] - ERROR: mysql连接异常: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods
  2. Traceback (most recent call last):
  3. File "D:\git_workspace\sanoh\G01_0345\sql.py", line 21, in connect
  4. database=self.database)
  5. File "D:\git_workspace\sanoh\G01_0345\venv_win32\lib\site-packages\pymysql\connections.py", line 353, in __init__
  6. self.connect()
  7. File "D:\git_workspace\sanoh\G01_0345\venv_win32\lib\site-packages\pymysql\connections.py", line 633, in connect
  8. self._request_authentication()
  9. File "D:\git_workspace\sanoh\G01_0345\venv_win32\lib\site-packages\pymysql\connections.py", line 932, in _request_authentication
  10. auth_packet = _auth.caching_sha2_password_auth(self, auth_packet)
  11. File "D:\git_workspace\sanoh\G01_0345\venv_win32\lib\site-packages\pymysql\_auth.py", line 265, in caching_sha2_password_auth
  12. data = sha2_rsa_encrypt(conn.password, conn.salt, conn.server_public_key)
  13. File "D:\git_workspace\sanoh\G01_0345\venv_win32\lib\site-packages\pymysql\_auth.py", line 144, in sha2_rsa_encrypt
  14. "'cryptography' package is required for sha256_password or caching_sha2_password auth methods"
  15. RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods
  16. Stack (most recent call last):
  17. File "D:\Python\Python36-32\lib\threading.py", line 884, in _bootstrap
  18. self._bootstrap_inner()
  19. File "D:\Python\Python36-32\lib\threading.py", line 916, in _bootstrap_inner
  20. self.run()
  21. File "D:\git_workspace\sanoh\G01_0345\pro.py", line 585, in run
  22. self.product_name_set()
  23. File "D:\git_workspace\sanoh\G01_0345\pro.py", line 503, in product_name_set
  24. paramresult = self.sqlclient.sql_inquire_all(sqlstr)
  25. File "D:\git_workspace\sanoh\G01_0345\sql.py", line 68, in sql_inquire_all
  26. self.connect()
  27. File "D:\git_workspace\sanoh\G01_0345\sql.py", line 24, in connect
  28. self.log_file.logger.error('mysql连接异常: {0}'.format(e), exc_info=True, stack_info=True)
  29. 2021-10-24 19:06:55,419 - D:\git_workspace\sanoh\G01_0345\sql.py[line:24] - ERROR: mysql连接异常: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods
  30. Traceback (most recent call last):
  31. File "D:\git_workspace\sanoh\G01_0345\sql.py", line 21, in connect
  32. database=self.database)
  33. File "D:\git_workspace\sanoh\G01_0345\venv_win32\lib\site-packages\pymysql\connections.py", line 353, in __init__
  34. self.connect()
  35. File "D:\git_workspace\sanoh\G01_0345\venv_win32\lib\site-packages\pymysql\connections.py", line 633, in connect
  36. self._request_authentication()
  37. File "D:\git_workspace\sanoh\G01_0345\venv_win32\lib\site-packages\pymysql\connections.py", line 932, in _request_authentication
  38. auth_packet = _auth.caching_sha2_password_auth(self, auth_packet)
  39. File "D:\git_workspace\sanoh\G01_0345\venv_win32\lib\site-packages\pymysql\_auth.py", line 265, in caching_sha2_password_auth
  40. data = sha2_rsa_encrypt(conn.password, conn.salt, conn.server_public_key)
  41. File "D:\git_workspace\sanoh\G01_0345\venv_win32\lib\site-packages\pymysql\_auth.py", line 144, in sha2_rsa_encrypt
  42. "'cryptography' package is required for sha256_password or caching_sha2_password auth methods"
  43. RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods
  44. Stack (most recent call last):
  45. File "D:\Python\Python36-32\lib\threading.py", line 884, in _bootstrap
  46. self._bootstrap_inner()
  47. File "D:\Python\Python36-32\lib\threading.py", line 916, in _bootstrap_inner
  48. self.run()
  49. File "D:\git_workspace\sanoh\G01_0345\pro.py", line 585, in run
  50. self.product_name_set()
  51. File "D:\git_workspace\sanoh\G01_0345\pro.py", line 503, in product_name_set
  52. paramresult = self.sqlclient.sql_inquire_all(sqlstr)
  53. File "D:\git_workspace\sanoh\G01_0345\sql.py", line 68, in sql_inquire_all
  54. self.connect()
  55. File "D:\git_workspace\sanoh\G01_0345\sql.py", line 24, in connect
  56. self.log_file.logger.error('mysql连接异常: {0}'.format(e), exc_info=True, stack_info=True)