I'm trying to auto-update Chrome webdriver using Chromedriver Auto-installer but it's not updating the webdriver. I get this error:
DevTools listening on ws://127.0.0.1:61707/devtools/browser/d1fc6270-6f69-47a3-90f3-54df9350bb0f
Traceback (most recent call last):
File "C:\Users\Kevin\Desktop\test2.py", line 9, in <module>
driver = webdriver.Chrome()
File "C:\Users\Kevin\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
super().__init__(DesiredCapabilities.CHROME['browserName'], "goog",
File "C:\Users\Kevin\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 92, in __init__
super().__init__(
File "C:\Users\Kevin\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 272, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\Kevin\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 364, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\Kevin\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 429, in execute
self.error_handler.check_response(response)
File "C:\Users\Kevin\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 243, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 106
Current browser version is 108.0.5359.125 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Stacktrace:
Backtrace:
Ordinal0 [0x00901ED3+2236115]
Ordinal0 [0x008992F1+1807089]
Ordinal0 [0x007A66FD+812797]
Ordinal0 [0x007C8C6D+953453]
Ordinal0 [0x007C4200+934400]
Ordinal0 [0x007C19C9+924105]
Ordinal0 [0x007F806C+1146988]
Ordinal0 [0x007F7A6A+1145450]
Ordinal0 [0x007F18A6+1120422]
Ordinal0 [0x007CA73D+960317]
Ordinal0 [0x007CB71F+964383]
GetHandleVerifier [0x00BAE7E2+2743074]
GetHandleVerifier [0x00BA08D4+2685972]
GetHandleVerifier [0x00992BAA+532202]
GetHandleVerifier [0x00991990+527568]
Ordinal0 [0x008A080C+1837068]
Ordinal0 [0x008A4CD8+1854680]
Ordinal0 [0x008A4DC5+1854917]
Ordinal0 [0x008AED64+1895780]
BaseThreadInitThunk [0x75A000F9+25]
RtlGetAppContainerNamedObjectPath [0x774F7BBE+286]
RtlGetAppContainerNamedObjectPath [0x774F7B8E+238]
I'm using code straight from the documentation.
from selenium import webdriver
import chromedriver_autoinstaller
chromedriver_autoinstaller.install() # Check if the current version of chromedriver exists
# and if it doesn't exist, download it automatically,
# then add chromedriver to path
driver = webdriver.Chrome()
driver.get("http://www.python.org")
assert "Python" in driver.title
It should check my version of chromedriver and update if needed, but that isn't happening at all.
Related
I want to use fota library, i enabled MCUBOOT but my program won't build after that. I'm using NRF SDK 1.8 with Zephyr 2.7.0
That's what i get :
Traceback (most recent call last):
File "C:/Users/ABC/workspace_visual_studio/project_Sc/iris_project_Sc/external/sdk/zephyr/scripts/zephyr_module.py", line 486, in <module>
main()
File "C:/Users/ABC/workspace_visual_studio/project_Sc/iris_project_Sc/external/sdk/zephyr/scripts/zephyr_module.py", line 480, in main
meta = process_meta(args.zephyr_base, west_proj, modules)
File "C:/Users/ABC/workspace_visual_studio/project_Sc/iris_project_Sc/external/sdk/zephyr/scripts/zephyr_module.py", line 298, in process_meta
'revision': git_revision(project_path)}
File "C:/Users/ABC/workspace_visual_studio/project_Sc/iris_project_Sc/external/sdk/zephyr/scripts/zephyr_module.py", line 263, in git_revision
rc = subprocess.Popen(['git', 'rev-parse', '--is-inside-work-tree'],
File "subprocess.py", line 854, in __init__
File "subprocess.py", line 1307, in _execute_child
NotADirectoryError: [WinError 267] Nom de répertoire non valide
ninja: build stopped: subcommand failed.
How are you enabled mcumgr for your project ?
Have you added all the required configuration in your prj.conf file ?
it would be better if you elaborate on your build logs.
for folder structure you can refer this.Overlay folder structure
I am trying to open chrome using selenium but getting this error . I have tried many ways but still this issue is not resolved.
Traceback (most recent call last):
File "sl.py", line 11, in <module>
chrome.Initialize()
File "/home/daffolap/api_test/api_test/utils.py", line 14, in Initialize
driver = webdriver.Chrome(executable_path=r"/home/daffolap/api_test/chromedriver2.exe")
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver`enter code here`2.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
driver=None
class Webbrowser:
#staticmethod
def Initialize():
global driver
driver = webdriver.Chrome(executable_path=r"/home/daffolap/api_test/chromedriver2.exe")
driver.maximize_window()
driver.implicitly_wait(5)
return driver
Running buildout. This might take a while...
While:
Installing ploneide.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/Plone/buildout-cache/eggs/zc.buildout-2.2.1-py2.7.egg/zc/buildout/buildout.py", line 1942, in main
getattr(buildout, command)(args)
File "/Plone/buildout-cache/eggs/zc.buildout-2.2.1-py2.7.egg/zc/buildout/buildout.py", line 622, in install
installed_files = self[part]._call(recipe.install)
File "/Plone/buildout-cache/eggs/zc.buildout-2.2.1-py2.7.egg/zc/buildout/buildout.py", line 1366, in _call
return f()
File "/Plone/zinstance/src/collective.recipe.ploneide/collective/recipe/ploneide/__init__.py", line 200, in install
self.install_developer_manual()
File "/Plone/zinstance/src/collective.recipe.ploneide/collective/recipe/ploneide/__init__.py", line 107, in install_developer_manual
res = subprocess.Popen(cmd, **kwargs)
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 2] No such file or directory
Buildout.cfg
develop =
src/collective.ploneide
src/collective.recipe.ploneide
parts=
ploneide
[Instance]
[ploneide]
recipe = collective.recipe.ploneide
ploneide may not be super well maintained at this point - last commit from 2012 https://github.com/collective/collective.ploneide
It would help if you posted your buildout.cfg and mentioned which OS you're using.
Linux ip-172-31-36-170 3.10.35-43.137.amzn1.x86_64 #1 SMP Wed Apr 2 09:36:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Amazon Linux AMI release 2014.03
cpe:/o:amazon:linux:2014.03:ga
I've run into a weird problem with a script that uses selenium.webdriver.PhantomJS.
SYMPTOMS…
My script uses the following to start a phantomjs session
from selenium import selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
(…)
def load_driver(self, _driver = "phantomjs", _path = "./phantomjs"):
if "phantom" in str(_driver).lower():
self.driver = webdriver.PhantomJS(_path)
Fails with:
selenium.common.exceptions.WebDriverException: Message: 'Unable to start phantomjs with ghostdriver.' ; Screenshot: available via screen
HOWEVER, at the python command line, everything works fine…
from selenium import webdriver
_path = './phantomjs.exe'
driver = webdriver.PhantomJS(_path)
PLATFORM: Linux
platform.system() != 'Windows': True
(I’ll explain “PLATFORM: Linux”, and “platform.system() != 'Windows': True” below)
SO…
I traced the error to the “/usr/lib/python2.6/site-packages/selenium/webdriver/phantomjs/service.py” and specifically this code…
def start(self):
"""
"""
try:
print "PLATFORM:", platform.system() #ADDED BY ME
# FOLLOWING ADDED BY ME, NOW CAUSING THE ERROR
print "platform.system() != 'Windows': ", platform.system() != 'Windows'
self.process = subprocess.Popen(self.service_args, stdin=subprocess.PIPE,
close_fds=platform.system() != 'Windows', # <-- THIS CAUSED ORIG PROB
stdout=self._log, stderr=self._log)
except Exception as e:
raise WebDriverException("Unable to start phantomjs with ghostdriver.", e)
AND HERE’S THE ISSUE…
When I run the code at the python command line (see above) everything is fine, AND the responses to ‘platform.system()’ and “platform.system() != 'Windows' ” are correct.
However, when I run my script, the ‘platform.system()’ reports blank and “platform.system() != 'Windows' ” errors. (See actual output below).
So, for some reason, when my script loads selenium and runs…THE SELENIUM CODE loses the ‘platform’ import.
Thanks for the help!
ACTUAL OUTPUT BELOW (NOTICE that 'PLATFORM:' is followed by 'blank' (instead of 'Linux'), and the next line “platform.system() != 'Windows' ” triggers the error. These lines were added by me into the SELENIUM code, not my code!)
PLATFORM:
Traceback (most recent call last):
File "./agmarknet.py", line 834, in <module>
username = options.username # --username
File "./agmarknet.py", line 124, in __init__
self.load_driver(driver, driver_path)
File "./agmarknet.py", line 521, in load_driver
self.driver = webdriver.PhantomJS(_path)
File "/usr/lib/python2.6/site-packages/selenium/webdriver/phantomjs/webdriver.py", line 50, in __init__
self.service.start()
File "/usr/lib/python2.6/site-packages/selenium/webdriver/phantomjs/service.py", line 64, in start
print "PLATFORM:", platform.system() #333
File "/usr/lib64/python2.6/platform.py", line 1272, in system
return uname()[0]
File "/usr/lib64/python2.6/platform.py", line 1239, in uname
processor = _syscmd_uname('-p','')
File "/usr/lib64/python2.6/platform.py", line 995, in _syscmd_uname
output = string.strip(f.read())
File "./agmarknet.py", line 350, in _signal_handler
self._cleanup()
File "./agmarknet.py", line 194, in _cleanup
self.driver.close()
AttributeError: 'Agmarknet' object has no attribute 'driver'
2014-05-18 12:42:40,281 - Agmarknet - INFO - Closing WebDriver...
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib64/python2.6/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "./agmarknet.py", line 194, in _cleanup
self.driver.close()
AttributeError: 'Agmarknet' object has no attribute 'driver'
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib64/python2.6/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "./agmarknet.py", line 194, in _cleanup
self.driver.close()
Are the Go AppEngine samples up to date?
I'm running into issues getting example/remote_api/datastore_info.go working for my test AppEngine running on localhost.
I've changed the client.PostForm from:
resp, err := client.PostForm("https://www.google.com/accounts/ClientLogin", v)
to:
resp, err := client.PostForm("http://localhost:35058/_ah/remote_api", v)
(35058 is the port reported for api_server during startup).
I've tried both 1.9.3 and latest 1.9.4 versions.
The api server reports:
ERROR 2014-05-06 20:57:56,378 api_server.py:215] Exception while handling
Traceback (most recent call last):
File "/root/go_appengine/google/appengine/tools/devappserver2/api_server.py", line 194, in _handle_POST
request.ParseFromString(wsgi_input)
File "/root/go_appengine/google/net/proto/ProtocolBuffer.py", line 88, in ParseFromString
self.MergeFromString(s)
File "/root/go_appengine/google/net/proto/ProtocolBuffer.py", line 95, in MergeFromString
self.MergePartialFromString(s)
File "/root/go_appengine/google/net/proto/ProtocolBuffer.py", line 109, in MergePartialFromString
self.TryMerge(d)
File "/root/go_appengine/google/appengine/ext/remote_api/remote_api_pb.py", line 210, in TryMerge
d.skipData(tt)
File "/root/go_appengine/google/net/proto/ProtocolBuffer.py", line 529, in skipData
self.skipData(t)
File "/root/go_appengine/google/net/proto/ProtocolBuffer.py", line 529, in skipData
self.skipData(t)
File "/root/go_appengine/google/net/proto/ProtocolBuffer.py", line 537, in skipData
raise ProtocolBufferDecodeError, "corrupted"
ProtocolBufferDecodeError: corrupted
There were some bug fixes in 1.9.6; can you try with the latest SDK?
I've been exactly the same problem in whatever call to my development server
Traceback (most recent call last):
File "/home/mike/go_appengine/google/appengine/tools/devappserver2/api_server.py", line 238, in _handle_POST
request.ParseFromString(wsgi_input)
File "/home/mike/go_appengine/google/net/proto/ProtocolBuffer.py", line 140, in ParseFromString
self.MergeFromString(s)
File "/home/mike/go_appengine/google/net/proto/ProtocolBuffer.py", line 152, in MergeFromString
self.MergePartialFromString(s)
File "/home/mike/go_appengine/google/net/proto/ProtocolBuffer.py", line 168, in MergePartialFromString
self.TryMerge(d)
File "/home/mike/go_appengine/google/appengine/ext/remote_api/remote_api_pb.py", line 210, in TryMerge
d.skipData(tt)
File "/home/mike/go_appengine/google/net/proto/ProtocolBuffer.py", line 677, in skipData
raise ProtocolBufferDecodeError, "corrupted"
ProtocolBufferDecodeError: corrupted
I've go version go1.4.2 (appengine-1.9.24) linux/amd64
Problem was I'm using the IP for "API" instead the IP for default module
INFO 2015-08-13 19:42:03,901 devappserver2.py:763] Skipping SDK update check.
INFO 2015-08-13 19:42:03,947 api_server.py:205] Starting API server at: http://localhost:60852
INFO 2015-08-13 19:42:03,971 dispatcher.py:197] Starting module "default" running at: http://localhost:49333
INFO 2015-08-13 19:42:03,972 admin_server.py:118] Starting admin server at: http://localhost:8000
You must use module host/por to place calls to your go application; API ip is for remote api, I think.