WebDriverException: Message: 'msedgedriver.exe' executable may have wrong permissions in Google Collab

Использую Google Collab

!wget  -O 'edgedriver_win64.zip' -q 
'https://msedgedriver.azureedge.net/96.0.1054.57/edgedriver_win64.zip'
!unzip '/content/edgedriver_win64.zip'

import selenium
from selenium import webdriver
wd = webdriver.Edge('/content/msedgedriver.exe')

Получаю ошибку:

/usr/local/lib/python3.7/dist-packages/ipykernel_launcher.py:3: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
  This is separate from the ipykernel package so we can avoid doing imports until
---------------------------------------------------------------------------
PermissionError                           Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/service.py in start(self)
     75                                             stdin=PIPE,
---> 76                                             creationflags=self.creationflags)
     77         except TypeError:

5 frames
PermissionError: [Errno 13] Permission denied: '/content/Driver_Notes/msedgedriver.exe'

During handling of the above exception, another exception occurred:

WebDriverException                        Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/service.py in start(self)
     86                 raise WebDriverException(
     87                     "'%s' executable may have wrong permissions. %s" % (
---> 88                         os.path.basename(self.path), self.start_error_message)
     89                 )
     90             else:

WebDriverException: Message: 'msedgedriver.exe' executable may have wrong permissions. Please download from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

Как ее можно исправить?


Ответы (0 шт):