Python FileNotFoundError: [WinError 2] The system cannot find the file specified.

============= RESTART: C:\Test_framework\src\test\test_baidu.py =============
Traceback (most recent call last):
  File "C:\Users\DLL\AppData\Local\Programs\Python\Python35\lib\site-packages\selenium\webdriver\common\service.py", line 62, in start
    stdout=self.log_file, stderr=self.log_file)
  File "C:\Users\DLL\AppData\Local\Programs\Python\Python35\lib\subprocess.py", line 676, in __init__
    restore_signals, start_new_session)
  File "C:\Users\DLL\AppData\Local\Programs\Python\Python35\lib\subprocess.py", line 957, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

Find subprocess.py in lib folder

1. Search for class Popen(object):

2. Change shell=False in __init__ to shell=True

Re-run the problem to solve.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324865668&siteId=291194637