0

I am using Selenium (Python) to create a webdriver. It was working fine a few hours ago. But now it gives the following exception:

Traceback (most recent call last):
  File "/local/data2/mwaqar/opt/Python-2.7.4/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/local/data2/mwaqar/opt/Python-2.7.4/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/cshome/mwaqar/AEK/AEK_extract_community.py", line 49, in extract_community
    driver = webdriver.Firefox()
  File "/local/data2/mwaqar/opt/Virtual-Python-2.7.4/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/firefox/webdriver.py", line 61, in __init__
    self.binary, timeout),
  File "/local/data2/mwaqar/opt/Virtual-Python-2.7.4/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/firefox/extension_connection.py", line 47, in __init__
    self.binary.launch_browser(self.profile)
  File "/local/data2/mwaqar/opt/Virtual-Python-2.7.4/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/firefox/firefox_binary.py", line 51, in launch_browser
    self._wait_until_connectable()
  File "/local/data2/mwaqar/opt/Virtual-Python-2.7.4/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/firefox/firefox_binary.py", line 95, in _wait_until_connectable
    self.profile.path, self._get_firefox_output()))
WebDriverException: Message: 'Can\'t load the profile. Profile Dir: /cshome/mwaqar/AEK/tmpgZ0n_J Firefox output: \n(Gecko:32421): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",\n*** LOG addons.xpi: startup\n*** LOG addons.xpi: checkForChanges\n*** LOG addons.xpi: No changes found\n*** LOG addons.xpi: Add-ons list is invalid, rebuilding\n*** LOG addons.xpi-utils: Opening database\n'

I have no idea what is causing this. Can somebody provide any pointers?

UPDATE: The code I am using is simple

from pyvirtualdisplay import Display
from selenium import webdriver

display = Display(size=(800,600), visible=0)
display.start()

driver = webdriver.Firefox() # gives exception
13
  • Try to disable/uninstall clearlooks addon. I think its hurting the webdriver I guess Commented Jun 26, 2013 at 6:19
  • I don't even use Firefox. If this is the issue, how was it working fine a few hours ago? Commented Jun 26, 2013 at 6:22
  • Probably you should paste the code to give better answer. I am assuming that you are running on Firefox by looking at the Exception Commented Jun 26, 2013 at 6:23
  • Added code. It's simple. Commented Jun 26, 2013 at 6:27
  • You don't have firefox browser installed on your machine? Commented Jun 26, 2013 at 6:30

1 Answer 1

0

I managed to solve the problem. The problem was that since I had executed the script a lot of times, therefore, many Firefox user profiles (corresponding to a webdriver instance) were present in /tmp/ and /var/tmp/ directories (by the name of tmp*). As soon as I removed these directories, the problem vanished.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.