首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不能进口

不能进口
EN

Stack Overflow用户
提问于 2022-10-25 19:38:00
回答 1查看 55关注 0票数 0

我的项目无法使导入idk显示错误

代码语言:javascript
复制
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上搜索过,但是没有找到任何东西。

EN

回答 1

Stack Overflow用户

发布于 2022-10-26 06:43:25

下面的控制台消息在一个问题上提供了更多的上下文,特别是在第43行:

代码语言:javascript
复制
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'?

看起来您可能在下面的区域有一个错误:

代码语言:javascript
复制
"SSLv2": (SSL.SSLv2_METHOD, BASIC_OPTIONS)

正如错误消息告诉我们的那样:

'OpenSSL.SSL' has no attribute 'SSLv2_METHOD'. Did you mean: 'SSLv23_METHOD'?

您可以尝试修改如下所示:

代码语言:javascript
复制
"SSLv2": (SSL.SSLv23_METHOD, BASIC_OPTIONS)

控制台日志中的其他文本似乎显示了完整的堆栈跟踪--其他地方可能有错误,但您发布的错误消息似乎是在第43行引用该特定错误。

下面的线程可能有助于进一步处理堆栈跟踪和调试:

Get exception description and stack trace which caused an exception, all as a string

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74199348

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档