• 카테고리

    질문 & 답변
  • 세부 분야

    데이터 엔지니어링

  • 해결 여부

    미해결

셀레니움 실행불가

21.07.11 17:09 작성 조회수 1.01k

0

from selenium import webdriver

from selenium.webdriver.common.keys import Keys

chromedriver = 'C:/dev_python/Webdriver'

driver = webdriver.Chrome(chromedriver)

이렇게 작성했는데

---------------------------------------------------------------------------
PermissionError                           Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\common\service.py in start(self)
     71             cmd.extend(self.command_line_args())
---> 72             self.process = subprocess.Popen(cmd, env=self.env,
     73                                             close_fds=platform.system() != 'Windows',

C:\ProgramData\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)
    857 
--> 858             self._execute_child(args, executable, preexec_fn, close_fds,
    859                                 pass_fds, cwd, env,

C:\ProgramData\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)
   1310             try:
-> 1311                 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
   1312                                          # no special security

PermissionError: [WinError 5] 액세스가 거부되었습니다

During handling of the above exception, another exception occurred:

WebDriverException                        Traceback (most recent call last)
<ipython-input-1-02e09ad0301c> in <module>
      3 
      4 chromedriver = 'C:/dev_python/Webdriver'
----> 5 driver = webdriver.Chrome(chromedriver)

C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\chrome\webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, keep_alive)
     71             service_args=service_args,
     72             log_path=service_log_path)
---> 73         self.service.start()
     74 
     75         try:

C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\common\service.py in start(self)
     84                 )
     85             elif err.errno == errno.EACCES:
---> 86                 raise WebDriverException(
     87                     "'%s' executable may have wrong permissions. %s" % (
     88                         os.path.basename(self.path), self.start_error_message)

WebDriverException: Message: 'Webdriver' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

이런 오류가 뜨네요...원인이 뭘까요?

답변 1

답변을 작성해보세요.

0

이승찬님의 프로필

이승찬

2021.07.11

'C:/dev_python/Webdriver/chromedriver'

까지 써주셔야해요 파일이름을 안적으셨네요

박태완님의 프로필

박태완

질문자

2021.07.11

아하!!감사합니다:)