Selenium error: selenium. common. exceptions. WebDriverException: Message: & amp; quot; Can & amp; #39; tloadtheprofile.

Source: Internet
Author: User

Error Description: An error occurred while initializing a firefox browser Using selenium in python code. After reading that the version of selenium is 2.35, I used firefox -- version to check that it is 28.0, firefox seems to be disobedient and automatically upgraded, resulting in the old version of selenium not supported.

Traceback (most recent call last ):
File "C: \ Python27 \ erSiteCompare. py", line 528, in
Sys. exit (main ())
File "C: \ Python27 \ erSiteCompare. py", line 525, in main
Sites. run ()
File "C: \ Python27 \ erSiteCompare. py", line 462, in run
Self. capture ()
File "C: \ Python27 \ erSiteCompare. py", line 353, in capture
Self. startSite1 ()
File "C: \ Python27 \ erSiteCompare. py", line 233, in startSite1
Raise e
Selenium. common. exceptions. WebDriverException: Message: "Can't load the profile.
Profile Dir: c: \ users \ cancelc \ appdata \ local \ temp \ tmp7pjtay Firefox output
:
* ** LOG addons. xpi: startup \ r \ n
* ** LOG addons. xpi: Skipping unavailable install location app-system-local \ r \ n
* ** LOG addons. xpi: Skipping unavailable install location app-system-share \ r \ n
* ** LOG addons. xpi: checkForChanges \ r \ n"

Solution:

Enter sudo pip install-U selenium to upgrade the current selenium version. It automatically connects me to pypi.python.com and obtains a 2.42 version package. After the upgrade, it will work properly.

If the sudo pip prompt cannot be found, you can first which pip and then directly sudo the pip directory, maybe the bin path is not included in bashrc.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.