当前位置:论坛首页 > Linux面板 > 求助

【已完成】8.1.12测试版的一个大 BUG!!!

发表在 Linux面板2024-4-17 07:28  关闭 [复制链接] 9 2050

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:

8.1.12,测试版
系统版本:

CentOS 7.7.1908.x86_64 (Py3.7.9)
问题描述:进入面板,经常弹出这样的错误:AttributeError: module 'cryptography.hazmat.bindings._rust.openssl' has no attribute 'hashes'
相关截图(日志、错误):

REQUEST_DATE: 2024-04-17 07:19:17
  VERSION: CentOS  7.7.1908 x86_64(Py3.7.9) - 8.1.12
REMOTE_ADDR: 120.244.10.33
REQUEST_URI: POST /config?action=get_config
REQUEST_FORM: {}
  USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Traceback (most recent call last):
  File "/www/server/panel/BTPanel/__init__.py", line 2439, in publicObject
    res = run_obj.run(toObject, defs, get)
  File "/www/server/panel/BTPanel/__init__.py", line 2386, in run
    result = getattr(toObject, get.action)(get)
  File "class/config.py", line 1667, in get_config
    from password import password
  File "class/password.py", line 20, in
    import public,data,database,config
  File "class/database.py", line 26, in
    import db_mysql
  File "class/db_mysql.py", line 16, in
    import pymysql
  File "", line 983, in _find_and_load
  File "", line 967, in _find_and_load_unlocked
  File "", line 668, in _load_unlocked
  File "", line 638, in _load_backward_compatible
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/PyMySQL-0.9.3-py3.7.egg/pymysql/__init__.py", line 96, in
    from . import connections as _orig_conn
  File "", line 983, in _find_and_load
  File "", line 967, in _find_and_load_unlocked
  File "", line 668, in _load_unlocked
  File "", line 638, in _load_backward_compatible
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/PyMySQL-0.9.3-py3.7.egg/pymysql/connections.py", line 17, in
    from . import _auth
  File "", line 983, in _find_and_load
  File "", line 967, in _find_and_load_unlocked
  File "", line 668, in _load_unlocked
  File "", line 638, in _load_backward_compatible
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/PyMySQL-0.9.3-py3.7.egg/pymysql/_auth.py", line 12, in
    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
    from cryptography.hazmat.primitives._serialization import (
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/cryptography/hazmat/primitives/_serialization.py", line 10, in
    from cryptography.hazmat.primitives.hashes import HashAlgorithm
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/cryptography/hazmat/primitives/hashes.py", line 87, in
    Hash = rust_openssl.hashes.Hash
AttributeError: module 'cryptography.hazmat.bindings._rust.openssl' has no attribute 'hashes'
使用道具 举报 只看该作者 回复
发表于 2024-4-17 09:11:41 | 显示全部楼层
您好,执行下面命令,再修复一下面板后访问
btpip install --upgrade cryptography
使用道具 举报 回复 支持 反对
发表于 2024-4-17 09:34:36 | 显示全部楼层
运维技术南一 发表于 2024-4-17 09:11
您好,执行下面命令,再修复一下面板后访问
btpip install --upgrade cryptography

Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Requirement already satisfied: cryptography in /www/server/panel/pyenv/lib/python3.7/site-packages (42.0.5)
Requirement already satisfied: cffi>=1.12 in /www/server/panel/pyenv/lib/python3.7/site-packages (from cryptography) (1.14.4)
Requirement already satisfied: pycparser in /www/server/panel/pyenv/lib/python3.7/site-packages (from cffi>=1.12->cryptography) (2.20)
WARNING: You are using pip version 20.3.3; however, version 24.0 is available.
You should consider upgrading via the '/www/server/panel/pyenv/bin/python3.7 -m pip install --upgrade pip' command.
使用道具 举报 回复 支持 反对
发表于 2024-4-17 09:50:50 | 显示全部楼层
dongzhiyu 发表于 2024-4-17 09:34
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Requirement already satisfied: cryptogr ...

执行一下
/www/server/panel/pyenv/bin/python3.7 -m pip install --upgrade pip
使用道具 举报 回复 支持 反对
发表于 2024-4-17 10:13:28 | 显示全部楼层
运维技术南一 发表于 2024-4-17 09:50
执行一下
/www/server/panel/pyenv/bin/python3.7 -m pip install --upgrade pip

安装了,执行了!  重启面板:还是报同样的错误!

AttributeError: module 'cryptography.hazmat.bindings._rust.openssl' has no attribute 'hashes'
使用道具 举报 回复 支持 反对
发表于 2024-4-17 10:23:55 | 显示全部楼层
dongzhiyu 发表于 2024-4-17 10:13
安装了,执行了!  重启面板:还是报同样的错误!

AttributeError: module 'cryptography.hazmat.bindin ...

私信我发送一下您的面板登录信息,我帮你看一下,私信完这里回复我
使用道具 举报 回复 支持 反对
发表于 2024-4-17 11:00:35 | 显示全部楼层
运维技术南一 发表于 2024-4-17 10:23
私信我发送一下您的面板登录信息,我帮你看一下,私信完这里回复我

私信已发,请查收!
使用道具 举报 回复 支持 反对
发表于 2024-4-17 12:17:06 | 显示全部楼层
运维技术南一 发表于 2024-4-17 10:23
私信我发送一下您的面板登录信息,我帮你看一下,私信完这里回复我

已经提供主机,私信给阁下了,还是报错!
使用道具 举报 回复 支持 反对
发表于 2024-4-17 15:10:54 | 显示全部楼层
dongzhiyu 发表于 2024-4-17 12:17
已经提供主机,私信给阁下了,还是报错!

访问不了,查了一下端口是关闭的,你那边检查一下
bf73cb84a9857f4dbf4a06d2ab4041bb.png
使用道具 举报 回复 支持 反对
发表于 2024-4-17 15:22:30 | 显示全部楼层
运维技术南一 发表于 2024-4-17 15:10
访问不了,查了一下端口是关闭的,你那边检查一下

实在是等不及了,我就自己用AI,给解决了!挺好的
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表