This is a typical problem in some localized distributions of Windows XP .
I am describing a solution for Python because it is different, without the identifier of the CamelCase BinaryLocation object, and it is less documented. Yes, the general solution is to create a new instance of ChromeOptions, but you can simply fix the error dynamically directly using ChromeOptions using some code started somewhere somewhere:
from selenium import webdriver webdriver.ChromeOptions.binary_location = ur"c:\Documents and Settings\user name\Local Settings\Data aplikací\Google\Chrome\Application\chrome.exe"
and leave all other codes unchanged:
from selenium import webdriver browser = webdriver.Chrome()
It is important to use ur"..."
unicode raw string literal in Python (not in a byte string if the path contains international characters), and not the usual u"..."
if the full path is hard-coded and the username begins with a special character after \
like \n \r \t
.
source share