You are not logged in.

#1 2016-06-11 15:54:50

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Issue loading selenium webdriver on new install

    $ python2
    Python 2.7.11 (default, Mar 31 2016, 06:18:34) 
    [GCC 5.3.0] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import selenium
    >>> from selenium import webdriver
    >>> browser = webdriver.Firefox()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 85, in __init__
	keep_alive=True)
      File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 90, in __init__
	self.start_session(desired_capabilities, browser_profile)
      File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 177, in start_session
	response = self.execute(Command.NEW_SESSION, capabilities)
      File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 234, in execute
	response = self.command_executor.execute(driver_command, params)
      File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 401, in execute
	return self._request(command_info[0], url, body=data)
      File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 432, in _request
	resp = self._conn.getresponse()
      File "/usr/lib/python2.7/httplib.py", line 1136, in getresponse
	response.begin()
      File "/usr/lib/python2.7/httplib.py", line 453, in begin
	version, status, reason = self._read_status()
      File "/usr/lib/python2.7/httplib.py", line 409, in _read_status
	line = self.fp.readline(_MAXLINE + 1)
      File "/usr/lib/python2.7/socket.py", line 480, in readline
	data = self._sock.recv(self._rbufsize)
    socket.error: [Errno 104] Connection reset by peer
    >>>

Did I forget to install something?

Firefox is installed as I am typing from it this very moment.

I tried to specify the binary as suggested here http://stackoverflow.com/questions/1758 … ch-firefox but no change.

is it something to do with setting up the desktop interface? since I never used one before and am on lxde. Never had this error before but I was using xvfb for the graphical interface in the past so the desktop is the only rogue element I can think of.

Last edited by MarthaParkin (2016-06-11 15:55:23)

Offline

#2 2016-06-11 17:43:03

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: Issue loading selenium webdriver on new install

MarthaParkin wrote:

Did I forget to install something?

community/python2-selenium


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2016-06-11 18:23:02

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: Issue loading selenium webdriver on new install

I had already installed it via pip2. But I uninstalled that and installed the one referenced above and still the same message.

Offline

#4 2016-06-11 18:47:23

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: Issue loading selenium webdriver on new install

From my system

ewaller@turing/home/ewaller/devel/python[1] % python2
Python 2.7.11 (default, Mar 31 2016, 06:18:34) 
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import selenium
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named selenium
>>> 
ewaller@turing/home/ewaller/devel/python % sudo pacman -S python2-selenium
[sudo] password for ewaller: 
resolving dependencies...
looking for conflicting packages...

Packages (1) python2-selenium-2.53.1-1

Total Download Size:   0.59 MiB
Total Installed Size:  1.89 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 python2-selenium-2.53.1-1-x86_64     604.6 KiB  3.47M/s 00:00 [##################################] 100%
(1/1) checking keys in keyring                                 [##################################] 100%
(1/1) checking package integrity                               [##################################] 100%
(1/1) loading package files                                    [##################################] 100%
(1/1) checking for file conflicts                              [##################################] 100%
(1/1) checking available disk space                            [##################################] 100%
:: Processing package changes...
(1/1) installing python2-selenium                              [##################################] 100%
Optional dependencies for python2-selenium
    lib32-glibc: Firefox x86 webdriver support for x86_64 [installed]
ewaller@turing/home/ewaller/devel/python % python2
Python 2.7.11 (default, Mar 31 2016, 06:18:34) 
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import selenium
>>> 
ewaller@turing/home/ewaller/devel/python % 

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2016-06-11 20:11:34

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: Issue loading selenium webdriver on new install

ewaller wrote:

From my system

ewaller@turing/home/ewaller/devel/python[1] % python2
Python 2.7.11 (default, Mar 31 2016, 06:18:34) 
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import selenium
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named selenium
>>> 
ewaller@turing/home/ewaller/devel/python % sudo pacman -S python2-selenium
[sudo] password for ewaller: 
resolving dependencies...
looking for conflicting packages...

Packages (1) python2-selenium-2.53.1-1

Total Download Size:   0.59 MiB
Total Installed Size:  1.89 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 python2-selenium-2.53.1-1-x86_64     604.6 KiB  3.47M/s 00:00 [##################################] 100%
(1/1) checking keys in keyring                                 [##################################] 100%
(1/1) checking package integrity                               [##################################] 100%
(1/1) loading package files                                    [##################################] 100%
(1/1) checking for file conflicts                              [##################################] 100%
(1/1) checking available disk space                            [##################################] 100%
:: Processing package changes...
(1/1) installing python2-selenium                              [##################################] 100%
Optional dependencies for python2-selenium
    lib32-glibc: Firefox x86 webdriver support for x86_64 [installed]
ewaller@turing/home/ewaller/devel/python % python2
Python 2.7.11 (default, Mar 31 2016, 06:18:34) 
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import selenium
>>> 
ewaller@turing/home/ewaller/devel/python % 

Yes but if you look above at my code I got that far. There is no error with importing selenium it is when I call the webdriver that it fails.

Last edited by MarthaParkin (2016-06-11 20:12:26)

Offline

#6 2016-06-11 20:47:03

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: Issue loading selenium webdriver on new install

ewaller@turing/home/ewaller % python2
Python 2.7.11 (default, Mar 31 2016, 06:18:34) 
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from selenium import webdriver
>>> 
ewaller@turing/home/ewaller % python2
Python 2.7.11 (default, Mar 31 2016, 06:18:34) 
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import selenium
>>> from selenium import webdriver
>>> 
ewaller@turing/home/ewaller % 

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#7 2016-06-12 12:23:57

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: Issue loading selenium webdriver on new install

ewaller wrote:
ewaller@turing/home/ewaller % python2
Python 2.7.11 (default, Mar 31 2016, 06:18:34) 
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from selenium import webdriver
>>> 
ewaller@turing/home/ewaller % python2
Python 2.7.11 (default, Mar 31 2016, 06:18:34) 
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import selenium
>>> from selenium import webdriver
>>> 
ewaller@turing/home/ewaller % 

Are you also using the latest firefox version 47 because I hear that this issue is to do with using selenium with the latest version of ff.

Offline

#8 2016-06-12 14:29:20

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: Issue loading selenium webdriver on new install

Yes.

ewaller@turing/boot % pacman -Qi firefox | head -2
Name            : firefox
Version         : 47.0-1
ewaller@turing/boot % 

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#9 2016-06-12 16:02:14

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: Issue loading selenium webdriver on new install

wait you stil didnt do the same as what I did. You are only importing not invoking the webdriver

If it still works for you then it will give me a better idea of where to look.

browser = webdriver.Firefox()

Last edited by MarthaParkin (2016-06-12 16:05:43)

Offline

#10 2016-06-12 23:17:43

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,452

Re: Issue loading selenium webdriver on new install

From Firefox 47 release notes: https://www.mozilla.org/en-US/firefox/4 … easenotes/

Known Issues section wrote:

Selenium WebDriver may cause Firefox to crash on startup, use Marionette WebDriver instead

Last edited by V1del (2016-06-12 23:18:04)

Offline

Board footer

Powered by FluxBB