Home > Back-end >  FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/MyDrive/Santillana/geck
FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/MyDrive/Santillana/geck

Time:01-25

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:

  • My drive´s files

    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 system. However you have downloaded the version of GeckoDriver:

    downloaded


    Solution

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

  •  Tags:  
  • Related