Python上的Selenium返回此错误消息。会不会有人碰巧知道怎么修理?在
C:\Users\nvarga\AppData\Local\Continuum\Anaconda3\python.exe "C:/Users/nvarga/PycharmProjects/HWIN/HWIN Account Spending Report.py" Traceback (most recent call last): File "C:\Users\nvarga\AppData\Local\Continuum\Anaconda3\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start stdout=self.log_file, stderr=self.log_file) File "C:\Users\nvarga\AppData\Local\Continuum\Anaconda3\lib\subprocess.py", line 947, in init restore_signals, start_new_session) File "C:\Users\nvarga\AppData\Local\Continuum\Anaconda3\lib\subprocess.py", line 1224, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified
在处理上述异常时,发生了另一个异常:
^{pr2}$
您需要下载geckodriverfrom here,并将它所在的目录放入您的PATH变量中。或者将geckodriver的路径作为
executable_path
参数传递给webdriver.Firefox(executable_path='/path/to/geckodriver')
相关问题 更多 >
编程相关推荐