1

My script look that way:

from selenium import webdriver
driver = webdriver.Firefox(executable_path='/bin/geckodriver.exe')
driver.get('http://inventwithpython.com')

There is an error like this:

Traceback (most recent call last):
  File "/home/natalia/.local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 76, in start
    stdin=PIPE)
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "slm.py", line 4, in <module>
    driver = webdriver.Firefox(executable_path='/bin/geckodriver.exe')
  File "/home/natalia/.local/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in __init__
    self.service.start()
  File "/home/natalia/.local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 88, in start
    os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver.exe' executable may have wrong permissions. 

I put geckodriver to folder bin.. And now I don't know what to do. Please give ma an advice.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

0 Answers0