Selenium 3.0.2 error with Firefox 50: executable may have wrong permissions

2024/10/14 18:21:31

I'm trying to use Selenium 3.0.2 with Firefox 50.0.1 in Windows 7. I've followed the instructions in this post to setup correctly the driver and the paths but I'm getting the following error:

Traceback (most recent call last):File "ixps-bgp.he.net.py", line 38, in <module>browser = webdriver.Firefox(firefox_binary=binary,capabilities=caps, executable_path='<path to gecko driver>')File "C:\Users\<myusername>\AppData\Local\Continuum\Anaconda2\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 140, in __init__self.service.start()File "C:\Users\<myusername>\AppData\Local\Continuum\Anaconda2\lib\site-packages\selenium\webdriver\common\service.py", line 86, in startos.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: '' executable may have wrong permissions.Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.firefox.service.Service object at 0x00000000023BA240>> ignored

Even when I try to execute the script as administrator I still get the error above. I'm using the latest version of the gecko driver (0.13) and I tried both the 64-bit and 32-bit versions. Is this a known issue with any of the current versions?

Answer

You should use entire exe address. If you pass just the folder you'll have problems.

>>>chromepath = "C:\\Dev\\chromedriver.exe"
>>>driver = webdriver.Chrome(chromepath)
https://en.xdnf.cn/q/117925.html

Related Q&A

Convert a jpg to a list of lists

Im trying to figure out how to convert a jpg into a list of lists (using python 3.2.3) such that:[ [red,blue,red,etc..], #line1 [blue,red,yellow, etc...], #line2 [orange,yellow,black,et…

TypeError: No to_python (by-value) converter found for C++ type

Im trying to expose my C++ Classes to Python using Boost.Python. Here is a simplyfied version of what Im trying to do:struct Base {virtual ~Base() {};virtual char const *Hello() {printf("Base.Hell…

USB interface in Python

I have this (http://www.gesytec.de/en/download/easylon/p/16/) USB device connected to my Win7. I am just trying to read the vendor ID and product ID. I have Python 2.7.Here is the code,import usb busse…

Django M2M Through extra fields with multiple models

Im trying to figure out the best way to set up the following django model (genericised for security reasons).ThingA:User(M2M through "UserRelation")ThingB:User(M2M through "UserRelation&…

Openpyxl: Worksheet object has no attribute values

My goal is to read in an excel file and view the codes in a pandas dataframe (i.e. = A3) rather than the resulting values from excel executing the codes, which is the pandas default if read in using pa…

Calculation of Contact/Coordination number with Periodic Boundary Conditions

I have data for N atoms including the radius of each atom, the position of each atom and the box dimensions. I want to calculate the number of atoms each atom is in contact with and store the result. T…

how can I export multiple images using zipfile and urllib2

I am trying to add multiple image files into my zip. I have searched around and knows how to add a single one. I tried to loop through multiple images then write into it but it didnt work. I kind of d…

XPATH for Scrapy

So i am using SCRAPY to scrape off the books of a website. I have the crawler working and it crawls fine, but when it comes to cleaning the HTML using the select in XPATH it is kinda not working out ri…

Kivy Removing elements from a Stack- / GridLayout

I made a pop-up. It is basically some rows of options (max. 5 rows).If I press the + button, there will be a new line of options.If I press the - button the last row should diasappear. Unfortunatelly i…

Bad timing when playing audio files with PyGame

When I play a sound every 0.5 second with PyGame:import pygame, timepygame.mixer.init() s = pygame.mixer.Sound("2.wav")for i in range(8):pygame.mixer.Channel(i).play(s)time.sleep(0.5)it doesn…