ModuleNotFoundError: No module named ‘blinker._saferef‘
weixin_41934979 2024-09-05 12:05:02 阅读 85
环境描述:
我这里用的Python 3.12.2,selenium_wire==5.1.0
报错信息:
截图
代码
<code>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
上一篇: C++过生日(我给我自己做的生日礼物)
本文标签
声明
本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。