logo
Loading...

使用Selenium 出現Traceback Error - Cupoy

在D019的題目當中用到了Selenium但系統執行了範例後會不斷traceback,並出現以下的錯...

pycrawler,pycrawler-d19

使用Selenium 出現Traceback Error

2020/01/18 02:37 PM
Python網路爬蟲論壇
Wei-Shan Chang
觀看數:0
回答數:2
收藏數:1
pycrawler
pycrawler-d19

在D019的題目當中用到了Selenium

但系統執行了範例後會不斷traceback,並出現以下的錯誤訊息 (後面太長就沒複製過來了)

估狗之後有些建議是chrome的驅動程式需要安裝在python path之下

可是安裝之後仍無法正常使用,請問是否有其他可能解決的方法呢? 謝謝!

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
~\Anaconda3\lib\site-packages\selenium\webdriver\common\service.py in start(self)
    75                                             stderr=self.log_file,
---> 76                                             stdin=PIPE)
    77         except TypeError:

~\Anaconda3\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
   774                                 errread, errwrite,
--> 775                                 restore_signals, start_new_session)
   776         except:

~\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
  1177                                          os.fspath(cwd) if cwd is not None else None,
-> 1178                                          startupinfo)
  1179             finally:

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

During handling of the above exception, another exception occurred:

WebDriverException                        Traceback (most recent call last)