0

I want to execute my python script by a batch file. I have no problem if i execute my python script manually, but if i use a batch file to execute it then i get the "'geckodriver' executable needs to be in Path" error. In both ways I use the same interpreter.

My batch file:

C:\Users\murac\PycharmProjects\IP_Klima_Strom\venv\Scripts\python.exe C:\Users\murac\PycharmProjects\IP_Klima_Strom\main.py
pause

my error warning:

Traceback (most recent call last):
  File "C:\Users\murac\PycharmProjects\IP_Klima_Strom\main.py", line 166, in <module>
    driver = webdriver.Firefox(firefox_profile=browser_profile, options=opts)
  File "C:\Users\murac\PycharmProjects\IP_Klima_Strom\venv\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 164, in __init__
    self.service.start()
  File "C:\Users\murac\PycharmProjects\IP_Klima_Strom\venv\lib\site-packages\selenium\webdriver\common\service.py", line 83, in start
    os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

My path Confi

I alreay updated my geckodriver and updated the path too, but nothing has changed. DO you have any idea to fix this?

Juln
  • 3
  • 2
  • Also add your PATH configuration. – Pedro Ferreira Dec 23 '20 at 15:00
  • Hi there, i have added the path confi in my question above. Thank you! – Juln Dec 23 '20 at 15:26
  • Does this answer your question? [Selenium using Python - Geckodriver executable needs to be in PATH](https://stackoverflow.com/questions/40208051/selenium-using-python-geckodriver-executable-needs-to-be-in-path) – Banana Dec 23 '20 at 15:38

1 Answers1

0

i guess if you put you geckodriver in the same folder with script its gonna work

mohen
  • 56
  • 1
  • 4