Forums

Regarding selenium-wire

I'm trying to launch chromedriver but it crashed with following messages. Can you please check my code and error?

from seleniumwire import webdriver  # Import from seleniumwire

co = webdriver.ChromeOptions()
co.add_argument("--headless")
co.add_argument("--disable-gpu")
# co.add_argument(f'authorization={self.authorization}')

driver = webdriver.Chrome(chrome_options=co)
driver.implicitly_wait(3)

driver.get('https://www.google.com')

if self.driver != None:
    self.driver.quit()

traceback:

07:42 ~/Github/apt_price (master)$ python3.6 test.py Traceback (most
recent call last):   File "test.py", line 9, in <module>
    driver = webdriver.Chrome()   File "/home/adonisgenie/.local/lib/python3.6/site-packages/seleniumwire/webdriver.py",
line 115, in __init__
    super().__init__(*args, **kwargs)   File "/home/adonisgenie/.local/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py",
line 81, in __init__
    desired_capabilities=desired_capabilities)   File "/home/adonisgenie/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py",
line 157, in __init__
    self.start_session(capabilities, browser_profile)   File "/home/adonisgenie/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py",
line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)   File "/home/adonisgenie/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py",
line 321, in execute
    self.error_handler.check_response(response)   File "/home/adonisgenie/.local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py",
line 242, in check_response
    raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error:
cannot parse capability: proxy from unknown error: 'noProxy' must be a
string   (Driver info: chromedriver=2.42.591071
(0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux
5.4.0-1029-aws x86_64)

[formatted by admin]

It looks like that is happening because selenium-wire requires a specific version of ChromeDriver, one that is more recent than the one that we support. We'll be releasing a new system image soon (hopefully within a week or so) that will have an updated ChromeDriver; we'll post back here when that is live.

@adonisgenie -- it's done! :) We've released new system image glastonbury which has updated ChromeDriver. To upgrade your system image, see: https://help.pythonanywhere.com/pages/ChangingSystemImage/.

Hi - I'm coming at this 18 months later and experiencing what I think is the same issue...

Rather than waiting for the a new system image every time, is there a way to manually update ChromeDriver on PythonAnywhere ourselves? I'm using the webdriver_manager module* successfully on a local Windows machine, but not on PythonAnywhere unfortunately... I'm a Linux novice so wouldn't know where the "correct" place to place the ChromeDriver file is, or how to set the equivalent of Windows PATH...

This could be the difference between me continuing to use PythonAnywhere for hosting my clients' scrapers, or looking elsewhere...

** Version 3.8.3 of Webdriver-Manager.. the latest version 3.8.4 has issues. Also using latest Selenium version 4.5.0

All the best, Pete

Hi - I'm coming at this 18 months later and experiencing what I think is the same issue...

Rather than waiting for the a new system image every time, is there a way to manually update ChromeDriver on PythonAnywhere ourselves? I'm using the webdriver_manager module* successfully on a local Windows machine, but not on PythonAnywhere unfortunately... I'm a Linux novice so wouldn't know where the "correct" place to place the ChromeDriver file is, or how to set the equivalent of Windows PATH...

This could be the difference between me continuing to use PythonAnywhere for hosting my clients' scrapers, or looking elsewhere...

** Version 3.8.3 of Webdriver-Manager.. the latest version 3.8.4 has issues. Also using latest Selenium version 4.5.0

All the best, Pete

There is no way for you to update chromedriver outside of the system image release cycle.