1502333491qkht 发表于 2025-11-21 10:36:27

【已解决】升级面板后,面板出错了AttributeError: module 'cry...

为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:v11.2.0
系统版本:CentOS 7
问题描述:AttributeError: module 'cryptography.hazmat.bindings._rust.openssl' has no attribute 'hashes'
相关截图(日志、错误):
Traceback (most recent call last):
File "/www/server/panel/BTPanel/__init__.py", line 2559, in publicObject
    res = run_obj.run(toObject, defs, get)
File "/www/server/panel/BTPanel/__init__.py", line 2506, in run
    result = getattr(toObject, get.action)(get)
File "/www/server/panel/class/panelController.py", line 81, in model
    result = PluginLoader.module_run(module_name,def_name,pdata)
File "/www/server/panel/class/panelModel/publicModel.py", line 112, in get_public_config
    data = _config_obj.get_config(args)
File "class/config.py", line 1881, in get_config
    from password import password
File "/www/server/panel/class/password.py", line 20, in <module>
    import public,data,database,config
File "/www/server/panel/class/database.py", line 26, in <module>
    import db_mysql
File "/www/server/panel/class/db_mysql.py", line 16, in <module>
    import pymysql
File "/www/server/panel/pyenv/lib/python3.7/site-packages/pymysql/__init__.py", line 59, in <module>
    from . import connections# noqa: E402
File "/www/server/panel/pyenv/lib/python3.7/site-packages/pymysql/connections.py", line 13, in <module>
    from . import _auth
File "/www/server/panel/pyenv/lib/python3.7/site-packages/pymysql/_auth.py", line 9, in <module>
    from cryptography.hazmat.primitives import serialization, hashes
File "/www/server/panel/pyenv/lib/python3.7/site-packages/cryptography/hazmat/primitives/serialization/__init__.py", line 7, in <module>
    from cryptography.hazmat.primitives._serialization import (
File "/www/server/panel/pyenv/lib/python3.7/site-packages/cryptography/hazmat/primitives/_serialization.py", line 10, in <module>
    from cryptography.hazmat.primitives.hashes import HashAlgorithm
File "/www/server/panel/pyenv/lib/python3.7/site-packages/cryptography/hazmat/primitives/hashes.py", line 89, in <module>
    Hash = rust_openssl.hashes.Hash
AttributeError: module 'cryptography.hazmat.bindings._rust.openssl' has no attribute 'hashes'

阿珂 发表于 2025-11-21 14:54:38

btpip install cryptography==42.0.5
btpip install pyOpenSSL==24.0.0
bt 1
执行命令看看
页: [1]
查看完整版本: 【已解决】升级面板后,面板出错了AttributeError: module 'cry...