我的项目无法使导入idk显示错误
seifahmed15@Ubuntu:~/Desktop/DAC-master$ python3 main.py
Traceback (most recent call last):
File "/home/seifahmed15/Desktop/DAC-master/main.py", line 2, in <module>
from user import create
File "/home/seifahmed15/Desktop/DAC-master/user.py", line 5, in <module>
import hcaptcha
File "/home/seifahmed15/Desktop/DAC-master/hcaptcha.py", line 6, in <module>
from seleniumwire.undetected_chromedriver import Chrome
File "/home/seifahmed15/.local/lib/python3.11/site-packages/seleniumwire/undetected_chromedriver/__init__.py", line 9, in <module>
from seleniumwire.webdriver import Chrome
File "/home/seifahmed15/.local/lib/python3.11/site-packages/seleniumwire/webdriver.py", line 13, in <module>
from seleniumwire import backend
File "/home/seifahmed15/.local/lib/python3.11/site-packages/seleniumwire/backend.py", line 4, in <module>
from seleniumwire.server import MitmProxy
File "/home/seifahmed15/.local/lib/python3.11/site-packages/seleniumwire/server.py", line 4, in <module>
from seleniumwire.handler import InterceptRequestHandler
File "/home/seifahmed15/.local/lib/python3.11/site-packages/seleniumwire/handler.py", line 5, in <module>
from seleniumwire import har
File "/home/seifahmed15/.local/lib/python3.11/site-packages/seleniumwire/har.py", line 11, in <module>
from seleniumwire.thirdparty.mitmproxy import connections
File "/home/seifahmed15/.local/lib/python3.11/site-packages/seleniumwire/thirdparty/mitmproxy/connections.py", line 9, in <module>
from seleniumwire.thirdparty.mitmproxy.net import tls, tcp
File "/home/seifahmed15/.local/lib/python3.11/site-packages/seleniumwire/thirdparty/mitmproxy/net/tls.py", line 43, in <module>
"SSLv2": (SSL.SSLv2_METHOD, BASIC_OPTIONS),
^^^^^^^^^^^^^^^^
AttributeError: module 'OpenSSL.SSL' has no attribute 'SSLv2_METHOD'. Did you mean: 'SSLv23_METHOD'?我已经重新安装python并尝试手动安装pkg,我在google和YouTube上搜索过,但是没有找到任何东西。
发布于 2022-10-26 06:43:25
下面的控制台消息在一个问题上提供了更多的上下文,特别是在第43行:
File "/home/seifahmed15/.local/lib/python3.11/site-packages/seleniumwire/thirdparty/mitmproxy/net/tls.py", line 43, in <module>
"SSLv2": (SSL.SSLv2_METHOD, BASIC_OPTIONS),
^^^^^^^^^^^^^^^^
AttributeError: module 'OpenSSL.SSL' has no attribute 'SSLv2_METHOD'. Did you mean: 'SSLv23_METHOD'?看起来您可能在下面的区域有一个错误:
"SSLv2": (SSL.SSLv2_METHOD, BASIC_OPTIONS)正如错误消息告诉我们的那样:
'OpenSSL.SSL' has no attribute 'SSLv2_METHOD'. Did you mean: 'SSLv23_METHOD'?
您可以尝试修改如下所示:
"SSLv2": (SSL.SSLv23_METHOD, BASIC_OPTIONS)控制台日志中的其他文本似乎显示了完整的堆栈跟踪--其他地方可能有错误,但您发布的错误消息似乎是在第43行引用该特定错误。
下面的线程可能有助于进一步处理堆栈跟踪和调试:
Get exception description and stack trace which caused an exception, all as a string
https://stackoverflow.com/questions/74199348
复制相似问题