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.
I alreay updated my geckodriver and updated the path too, but nothing has changed. DO you have any idea to fix this?