"Can't load the profile" error occured with Selenium WebDriver by Python3.5 and FF48
<p>&nbsp;I'm trying to use Selenium with Python.<br />
&nbsp;So, I wrote the following codes and save as the file named <strong>test.py</strong> in working directory <strong>/Users/ykt68/seleniumwork</strong> .</p>

<pre class="lang-none prettyprint-override"><code>[ykt68@macbp15 seleniumwork]$ pwd
/Users/ykt68/seleniumwork
[ykt68@macbp15 seleniumwork]$ cat -n test.py
</code></pre>

<pre class="lang-py prettyprint-override"><code>     1  #! /usr/bin/env python
     2  # -*- encoding: utf-8 -*-
     3  
     4  from selenium import webdriver
     5  from selenium.webdriver.common.keys import Keys
     6  
     7  driver = webdriver.Firefox()
     8  driver.get("http://www.python.org")
     9  assert "Python" in driver.title
    10  elem = driver.find_element_by_name("q")
    11  elem.clear()
    12  elem.send_keys("pycon")
    13  elem.send_keys(Keys.RETURN)
    14  assert "No results found." not in driver.page_source
    15  driver.close()
</code></pre>

<pre class="lang-none prettyprint-override"><code>[ykt68@macbp15 seleniumwork]$
</code></pre>

<p>&nbsp;These codes above are the same as <a href="http://selenium-python.readthedocs.io/getting-started.html#simple-usage" rel="nofollow">2.1 Simple Usage</a> in documents of <a href="http://selenium-python.readthedocs.io/index.html" rel="nofollow">Selenium with Python</a>.</p>

<p>&nbsp;When I ran the python command for test.py above,</p>

<ul>
<li>FireFox browser started and opened a blank tab.</li>
<li>And after about 30 seconds have passed, the following error messages were displayed and FireFox window was closed.</li>
</ul>

<pre class="lang-none prettyprint-override"><code>[ykt68@macbp15 seleniumwork]$ python test.py 
Traceback (most recent call last):
  File "test.py", line 7, in &lt;module&gt;
    driver = webdriver.Firefox()
  File "/Users/ykt68/.pyenv/versions/seleniumwork/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 80, in __init__
    self.binary, timeout)
  File "/Users/ykt68/.pyenv/versions/seleniumwork/lib/python3.5/site-packages/selenium/webdriver/firefox/extension_connection.py", line 52, in    __init__
    self.binary.launch_browser(self.profile, timeout=timeout)
  File "/Users/ykt68/.pyenv/versions/seleniumwork/lib/python3.5/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser
    self._wait_until_connectable(timeout=timeout)
  File "/Users/ykt68/.pyenv/versions/seleniumwork/lib/python3.5/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 108, in _wait_until_connectable
    % (self.profile.path))
selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: /var/folders/86/55p1gj4j4xz2nw9g5q224bk40000gn/T/tmpf0uolidn If you specified a log_file in the FirefoxBinary constructor, check it for details.

[ykt68@macbp15 seleniumwork]$
</code></pre>

<p>&nbsp;Please teach me why this error has occured and how to solve the problem or list some posts or documents I should refer.</p>

<p>&nbsp;In addition, </p>

<ol>
<li>Environments: 

<ul>
<li>OS: Apple OS X Version 10.11.6</li>
<li>Python Version: 3.5.2</li>
<li>FireFox Version: 48.0.2</li>
<li>selenium Version: 2.53.6</li>
</ul></li>
</ol>

<pre class="lang-none prettyprint-override"><code>[ykt68@macbp15 seleniumwork]$ python -V
Python 3.5.2
[ykt68@macbp15 seleniumwork]$ /Applications/Firefox.app/Contents/MacOS/firefox -v
Mozilla Firefox 48.0.2
[ykt68@macbp15 seleniumwork]$ /Applications/Firefox.app/Contents/MacOS/firefox-bin -v
Mozilla Firefox 48.0.2
[ykt68@macbp15 seleniumwork]$ pip list
pip (8.1.2)
selenium (2.53.6)
setuptools (20.10.1)
[ykt68@macbp15 seleniumwork]$
</code></pre>

<ol start="2">
<li>I reffered the similar post of
<a href="http://stackoverflow.com/questions/6682009/selenium-firefoxprofile-exception-cant-load-the-profile">Selenium: FirefoxProfile exception Can&#39;t load the profile</a>. So I tried</li>
</ol>



<pre><code>pip install -U selenium
</code></pre>

<p>But the situation with error messages above remains unchanged.</p>

<p>Best Regards.</p>

<p>From what I understand and concluded, you can keep the latest <code>selenium</code> package version, but you have to <em>downgrade Firefox to 47</em> (<a href="https://ftp.mozilla.org/pub/firefox/releases/47.0.1/" rel="nofollow">47.0.1</a> is the latest stable from the 47 branch).</p>

python selenium selenium-webdriver