1

I am running Ubuntu Xenial 16.04 on a dedicated server, I wanted to start coding in Python so I followed this tutorial : https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-16-04-server

I installed Selenium and Chromedriver as well and I wrote this really simple script.py :

from time import sleep
from selenium import webdriver

browser = webdriver.Chrome()
browser.get('https://www.google.com')
sleep(5)
browser.close()

But when I run the script it is hanging forever forcing me to interrupt it. When I do that this is what I get :

^CTraceback (most recent call last):
  File "script.py", line 4, in <module>
    browser = webdriver.Chrome()
  File "/home/vcluzeau/python/my_env/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py", line 75, in __init__
    desired_capabilities=desired_capabilities)
  File "/home/vcluzeau/python/my_env/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "/home/vcluzeau/python/my_env/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/vcluzeau/python/my_env/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 310, in execute
    response = self.command_executor.execute(driver_command, params)
  File "/home/vcluzeau/python/my_env/lib/python3.5/site-packages/selenium/webdriver/remote/remote_connection.py", line 466, in execute
    return self._request(command_info[0], url, body=data)
  File "/home/vcluzeau/python/my_env/lib/python3.5/site-packages/selenium/webdriver/remote/remote_connection.py", line 490, in _request
    resp = self._conn.getresponse()
  File "/usr/lib/python3.5/http/client.py", line 1197, in getresponse
    response.begin()
  File "/usr/lib/python3.5/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.5/http/client.py", line 258, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.5/socket.py", line 575, in readinto
    return self._sock.recv_into(b)
KeyboardInterrupt

Do you guys know how can I fix this? Thanks!

1 Answer 1

0

The Python Error Steamroller package from Python Software uses a combination of dynamic compilation, Abstract Syntax Tree rewriting, live call stack modification, and love to get rid of all those pesky errors that make programming so hard. It is a instant but temporary solution for modules that cause errors.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .