title: Python - Selenium - set_page_load_timeout: Not a Number
body: <p>I've got a pretty simple selenium script running on a raspberry pi.</p>
  
  <p>I was having issues with a specific page not loading so I wanted to reduce the timeout on <code>driver.get(url)</code> to be 15 seconds to hopefully prevent things from hanging. I used this post as a guide on how to set that info. <a href="https://stackoverflow.com/questions/17533024/how-to-set-selenium-python-webdriver-default-timeout">How to set Selenium Python WebDriver default timeout?</a> </p>
  
  <p>I get an odd error stating that I'm not passing a number when I am clearly passing a number</p>
  
  <pre><code>&gt;&gt;&gt; from selenium import webdriver
  &gt;&gt;&gt; from pyvirtualdisplay import Display
  &gt;&gt;&gt; 
  &gt;&gt;&gt; display = Display(visible=0, size=(1200, 1200))
  &gt;&gt;&gt; display.start()
  &lt;Display cmd_param=['Xvfb', '-br', '-nolisten', 'tcp', '-screen', '0', '1200x1200x24', ':1009'] cmd=['Xvfb', '-br', '-nolisten', 'tcp', '-screen', '0', '1200x1200x24', ':1009'] oserror=None return_code=None stdout="None" stderr="None" timeout_happened=False&gt;
  &gt;&gt;&gt; driver = webdriver.Firefox()
  &gt;&gt;&gt; driver.set_page_load_timeout(15)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/home/pi/Projects/yesware_prod/yesware/venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 727, in set_page_load_timeout
      'pageLoad': int(float(time_to_wait) * 1000)})
    File "/home/pi/Projects/yesware_prod/yesware/venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 238, in execute
      self.error_handler.check_response(response)
    File "/home/pi/Projects/yesware_prod/yesware/venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 193, in check_response
      raise exception_class(message, screen, stacktrace)
  selenium.common.exceptions.WebDriverException: Message: Not a Number
  </code></pre>
  
  <p>I'm not sure what the issue is. Even if I confirm that I'm passing in an integer I'm still getting the error</p>
  
  <pre><code>&gt;&gt;&gt; num_secs = 15
  &gt;&gt;&gt; type(num_secs)
  &lt;type 'int'&gt;
  &gt;&gt;&gt; driver.set_page_load_timeout(num_secs)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/home/pi/Projects/yesware_prod/yesware/venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 727, in set_page_load_timeout
      'pageLoad': int(float(time_to_wait) * 1000)})
    File "/home/pi/Projects/yesware_prod/yesware/venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 238, in execute
      self.error_handler.check_response(response)
    File "/home/pi/Projects/yesware_prod/yesware/venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 193, in check_response
      raise exception_class(message, screen, stacktrace)
  selenium.common.exceptions.WebDriverException: Message: Not a Number
  </code></pre>
  
  <p>Here's a link to the github page - <a href="https://github.com/SeleniumHQ/selenium/blob/fa24958570432ee6eadaadc9a7fb92e1ee380dfc/py/selenium/webdriver/remote/webdriver.py#L714" rel="nofollow noreferrer">https://github.com/SeleniumHQ/selenium/blob/fa24958570432ee6eadaadc9a7fb92e1ee380dfc/py/selenium/webdriver/remote/webdriver.py#L714</a></p>
  
  <p><strong>EDIT</strong> I ended up finding a workaround by using <code>PhantomJS()</code> rather than <code>Firefox()</code>. This tutorial is fantastic - <a href="https://stackoverflow.com/questions/36314771/how-to-install-phantomjs-for-use-with-python-selenium-on-the-raspberry-pi">How to install PhantomJS for use with Python Selenium on the Raspberry Pi?</a></p>