gpt4 book ai didi

python - throw [HTTPError : HTTP Error 503: Service Unavailable] Error after the selenium tests are done using Python

转载 作者:太空宇宙 更新时间:2023-11-03 13:18:22 27 4
gpt4 key购买 nike

 self.driver.quit()
File "C:\Python27\lib\site-packages\selenium-2.40.0-py2.7.egg\selenium\webdriver\chrome\webdriver.py", line 82, in quit
self.service.stop()
File "C:\Python27\lib\site-packages\selenium-2.40.0-py2.7.egg\selenium\webdriver\chrome\service.py", line 97, in stop
url_request.urlopen("http://127.0.0.1:%d/shutdown" % self.port)
File "C:\Python27\lib\urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "C:\Python27\lib\urllib2.py", line 410, in open
response = meth(req, response)
File "C:\Python27\lib\urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python27\lib\urllib2.py", line 448, in error
return self._call_chain(*args)
File "C:\Python27\lib\urllib2.py", line 382, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

HTTPError: HTTP Error 503: Service Unavailable

最佳答案

这种情况是否只发生在 Chrome 上?我遇到了 similar issue产生完全相同的堆栈跟踪(尽管是 407 而不是 503),所以我很想知道相同的解决方案是否对这里有帮助。

导航到控制面板 > Internet 选项 > 连接选项卡 > LAN 设置 > 高级。然后,将 127.0.0.1 插入异常(exception)框。就我而言,这足以防止调用 .quit() 时发生崩溃。

关于python - throw [HTTPError : HTTP Error 503: Service Unavailable] Error after the selenium tests are done using Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22224945/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com