Python build error while building selenium webdriver project

感情迁移 提交于 2019-12-24 09:48:35

问题


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

  • Situation: Windows 10
  • Appium: cloned repo, built successfully
  • Selenium: cloned, but having troubles.
  • Installed: Java, JDK, python 3.6, Ruby, Rake gem.
  • Error, I use go + a target, eg 'go build', 'go' or 'go firefox'. However I'm always getting the following error:

The error:

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!

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...


回答1:


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

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



来源:https://stackoverflow.com/questions/45657453/python-build-error-while-building-selenium-webdriver-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!