I am trying to use Selenium in Google Colab, but i get some errors when i try to run a Firefox instance. i followed this links:
The entire error:
--------------------------------------------------------------------------- FileNotFoundError 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: 4 frames FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/MyDrive/Santillana/geckodriver': '/content/drive/MyDrive/Santillana/geckodriver' 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) 81 raise WebDriverException( 82 "'%s' executable needs to be in PATH. %s" % ( ---> 83 os.path.basename(self.path), self.start_error_message) 84 ) 85 elif err.errno == errno.EACCES: WebDriverException: Message: 'geckodriver' executable needs to be in PATH.CodePudding user response:
This error message...
FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/MyDrive/Santillana/geckodriver': '/content/drive/MyDrive/Santillana/geckodriver'...implies that your program was unable to locate the GeckoDriver executable.
Analysis
As per the error message it seems you are on a linux system. However you have downloaded the windows version of GeckoDriver:

Solution
Instead of the Windows version of GeckoDriver possibly you need to download the Linux version of GeckoDriver executable.
