首页 > Python资料 博客日记

ModuleNotFoundError: No module named ‘blinker._saferef‘

2024-10-21 17:00:05Python资料围观41

这篇文章介绍了ModuleNotFoundError: No module named ‘blinker._saferef‘,分享给大家做个参考,收藏Python资料网收获更多编程知识

环境描述:

 我这里用的Python 3.12.2,selenium_wire==5.1.0

报错信息:

截图

代码

File "D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\webdriver.py", line 28, in <module>
    from seleniumwire import backend, utils
  File "D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\backend.py", line 4, in <module>
    from seleniumwire.server import MitmProxy
  File "D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\server.py", line 5, in <module>
    from seleniumwire.handler import InterceptRequestHandler
  File "D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\handler.py", line 5, in <module>
    from seleniumwire import har
  File "D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\har.py", line 11, in <module>
    from seleniumwire.thirdparty.mitmproxy import connections
  File "D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\thirdparty\mitmproxy\connections.py", line 10, in <module>
    from seleniumwire.thirdparty.mitmproxy.net import tls, tcp
  File "D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\thirdparty\mitmproxy\net\tls.py", line 15, in <module>
    import seleniumwire.thirdparty.mitmproxy.options
  File "D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\thirdparty\mitmproxy\options.py", line 5, in <module>
    from seleniumwire.thirdparty.mitmproxy import optmanager
  File "D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\thirdparty\mitmproxy\optmanager.py", line 9, in <module>
    import blinker._saferef
ModuleNotFoundError: No module named 'blinker._saferef'

解决办法:

pip install blinker==1.7.0

错误分析:

selenium-wire缺少blinker==1.7.0库依赖,因此需要安装blinker==1.7.0 

参考链接

https://github.com/seleniumbase/SeleniumBase/issues/2782


版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:jacktools123@163.com进行投诉反馈,一经查实,立即删除!

标签:

相关文章

本站推荐