I am trying to use selenium with a Python script on my mac that requires firefox (& I've cloned geckodriver from github) but for some reason, there seems to be some type of issue with the webdriver (I know it needs firefoxdriver & firebug, I got geckodriver). I'm really like a noob (I'm a CS student & sort of a beginner trying to learn). I feel like maybe my issue has to do with my Firefox profile not being in the Path but i really don't know. This is the error I'm getting:
File "/Library/Python/2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 103, in __init__
self.binary, timeout)
File "/Library/Python/2.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 51, in __init__
self.binary.launch_browser(self.profile, timeout=timeout)
File "/Library/Python/2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser
self._wait_until_connectable(timeout=timeout)
File "/Library/Python/2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 106, in _wait_until_connectable
% (self.profile.path))
selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: /var/folders/jr/61813w490n14yrp433c8d9zr0000gn/T/tmpIeQVyC If you specified a log_file in the FirefoxBinary constructor, check it for details.
I found another solution to a similar problem to mine Firefox driver can't start for Selenium 3.0.1 with FF49 and Python but in python I get:
from selenium import webdriver browser = webdriver.Firefox() Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 103, in init self.binary, timeout) File "/Library/Python/2.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 51, in init self.binary.launch_browser(self.profile, timeout=timeout) File "/Library/Python/2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser self._wait_until_connectable(timeout=timeout) File "/Library/Python/2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 106, in _wait_until_connectable % (self.profile.path)) selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: /var/folders/jr/61813w490n14yrp433c8d9zr0000gn/T/tmp6f_7bG If you specified a log_file in the FirefoxBinary constructor, check it for details.
So, if anyone might have any idea what's wrong w/my selenium & webdriver- when I installed Selenium I got this error:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 6, in <module>
from pkg_resources import load_entry_point
File "/Users/tamarafrankel/Library/Python/2.7/lib/python/site- packages/pkg_resources/__init__.py", line 70, in <module>
import packaging.version
ImportError: No module named packaging.version
Any help would really be appreciated- I've scoured the internet for days trying to find a solution & trying various things.
Also, I found this question which was similar: Selenium: FirefoxProfile exception Can't load the profile but I'm running the script with sudo and I am using the command pip install -U selenium (both of which they say are fixes to this problem)