构建Selenium WebDriver项目时Python构建错误 [英] Python build error while building selenium webdriver project

查看:109
本文介绍了构建Selenium WebDriver项目时Python构建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试进入一些开源项目,并且作为质量检查工程师,我一直在研究Appium和Selenium.

I'm attempting to get into some opensource projects, and as a QA engineer, have been looking at Appium and Selenium.

  • 情况:Windows 10
  • Appium:克隆的存储库,已成功构建
  • 硒:已克隆,但遇到了麻烦.
  • 已安装:Java,JDK,python 3.6,Ruby,Rake gem.
  • 错误,我使用go +一个目标,例如'go build','go'或'go firefox'.但是,我总是遇到以下错误:

错误:

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可能存在问题外,我无法在网上找到任何类似的内容.但是我刚刚下载了最新版本,因此不会出现问题...

I'm unable to find anything similar online aside from one post suggesting an issue with older versions of Python potentially. However I've just downloaded the latest, so wouldn't expect an issue...

推荐答案

此处使用的Selenium构建脚本(crazyfunbuild或buckd取决于设置和安装的工具)使用Python 2.7(在撰写本文时).

The Selenium build scripts utilised here (either crazyfunbuild or buckd depending on setup and tools installed) uses Python 2.7 (at time of writing).

从3.6降级到2.7至少解决了我的(python)问题.

A downgrade from 3.6 to 2.7 solved my (python) issues at least.

这篇关于构建Selenium WebDriver项目时Python构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆