我正在尝试在Jenkins的基于Ubuntu的服务器上运行基于Selenium的测试但是会出现以下隐藏错误:
首先
+ python manage.py jenkins --enable-coverage --settings=Modeling.settings.dev
......EException AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b67b3ac50>> ignored
EException AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66b2ed10>> ignored
EEException AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66b4bad0>> ignored
Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66ad5a90>> ignored
EException AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66ae3110>> ignored
EEException AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66af06d0>> ignored
Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66af12d0>> ignored
EException AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66af1ad0>> ignored
EEException AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66b03ad0>> ignored
Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66b08f50>> ignored
EEEException AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66b08790>> ignored
Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66b08d50>> ignored
Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66b0bbd0>> ignored
EEException AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66a95a10>> ignored
Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f6b66b08550>> ignored
再往下走一点:
Traceback (most recent call last):
File "/var/lib/jenkins/jobs/GS_modelling_web_tests/workspace/modeling/Modeling/tests/BaseTest.py", line 18, in setUp
self.browser = webdriver.Chrome( ChromeDriver.path() )
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 61, in __init__
self.service.start()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 62, in start
stdout=self.log_file, stderr=self.log_file)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 8] Exec format error
对于我看到Scrapy with selenium, webdriver failing to instantiate的第一个错误,但这似乎与关闭有关?根据{{3}},第二个错误似乎与shebangs有关但我无法理解我是否可以使用该信息。这是怎么回事?
答案 0 :(得分:3)
OSError:[Errno 8]执行格式错误
Ubuntu平台不支持此处提供的ChromeDriver可执行文件。 对于Ubuntu,使用chromedriver for ubuntu http://chromedriver.storage.googleapis.com/2.23/chromedriver_linux32.zip或http://chromedriver.storage.googleapis.com/2.23/chromedriver_linux64.zip
完整列表可在https://sites.google.com/a/chromium.org/chromedriver/downloads
找到