Python script using webdriver (selenium) hanging forever

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












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!










share|improve this question

























    up vote
    1
    down vote

    favorite












    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!










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      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!










      share|improve this question













      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!







      python






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 9 at 19:09









      vltclz

      62




      62




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          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.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1004654%2fpython-script-using-webdriver-selenium-hanging-forever%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            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.






            share|improve this answer
























              up vote
              0
              down vote













              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.






              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                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.






                share|improve this answer












                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.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 10 at 6:15









                stumblebee

                2,3063922




                2,3063922



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1004654%2fpython-script-using-webdriver-selenium-hanging-forever%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    GRUB: Fatal! inconsistent data read from (0x84) 0+xxxxxx

                    What makes Checkinstall packages not suitable for distribution?

                    Running the scala interactive shell from the command line