我正在尝试进入一些开源项目,作为一名 QA 工程师,我一直在研究 Appium 和 Selenium。
错误:
C:\Users\Mark\selenium>go build
(in C:/Users/Mark/selenium)
python C:/Users/Mark/selenium/buck-out/crazy-fun/7c1417f319649e9fd58fd3f97f36f42c870b1790/buck.pex kill
Traceback (most recent call last):
File "C:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\Mark\AppData\Local\Programs\Python\Python36-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Mark\selenium\buck-out\crazy-fun\7c1417f319649e9fd58fd3f97f36f42c870b1790\buck.pex\__main__.py", line 25, in <module>
File "C:\Users\Mark\selenium\buck-out\crazy-fun\7c1417f319649e9fd58fd3f97f36f42c870b1790\buck.pex\.bootstrap\_pex\pex_bootstrapper.py", line 94, in bootstrap_pex
File "C:\Users\Mark\selenium\buck-out\crazy-fun\7c1417f319649e9fd58fd3f97f36f42c870b1790\buck.pex\.bootstrap\_pex\finders.py", line 218, in register_finders
AttributeError: module 'importlib._bootstrap' has no attribute 'FileFinder'
go aborted!
除了一篇文章暗示旧版本的 Python 可能存在问题外,我无法在网上找到任何类似的东西。但是我刚刚下载了最新的,所以不会出现问题...
最佳答案
这里使用的 Selenium 构建脚本(根据安装的设置和工具,可能是 crazyfunbuild 或 buckd)使用 Python 2.7(在撰写本文时)。
从 3.6 降级到 2.7 至少解决了我的 (python) 问题。
关于构建 selenium webdriver 项目时 Python 构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45657453/