Has anyone run across this error before? I just started getting this error on monday. Why is it having issues with connecting?
Selenium will open the browser but will not plug in the url.
C:\Python34\python.exe "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.5\helpers\pydev\pydevd.py" --multiproc --client 127.0.0.1 --port 49660 --file //HAL1/FTP-Directories/Comal-County/comal.py
pydev debugger: process 5564 is connecting
Connected to pydev debugger (build 139.1547)
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.5\helpers\pydev\pydevd.py", line 2217, in <module>
globals = debugger.run(setup['file'], None, None)
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.5\helpers\pydev\pydevd.py", line 1643, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition4.0.5\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "//HAL1/FTP-Directories/Comal-County/comal.py", line 7, in <module>
driver = webdriver.Firefox();
File "C:\Python34\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 59, in __init__
self.binary, timeout),
File "C:\Python34\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 47, in __init__
self.binary.launch_browser(self.profile)
File "C:\Python34\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 66, in launch_browser
self._wait_until_connectable()
File "C:\Python34\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 105, in _wait_until_connectable
raise WebDriverException("Can't load the profile. Profile "
selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: %s If you specified a log_file in the FirefoxBinary constructor, check it for details.
Code:
from selenium import webdriver
driver = webdriver.Firefox();
driver.get("http://www.google.com")
This is a compatibility issue between selenium
and Firefox
.
Upgrade your Firefox
to the latest version (36 at the moment).
And upgrade selenium
to the latest version (2.45 at the moment):
pip install --upgrade selenium
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With