jpjacobpadilla / Google-Colab-Selenium

The best way to use Selenium in Google Colab Notebooks!
https://pypi.org/project/google-colab-selenium/
MIT License
181 stars 20 forks source link

File Not Found Error #10

Closed komplykated closed 3 months ago

komplykated commented 3 months ago

I tried to get data for around 200 pages, it runs around 10 minutes then suddenly returned an error like this

FileNotFoundError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/google_colab_selenium/undetected_chromedriver.py in init(self, options, keep_alive) 39 with Spinner('Initializing Chromedriver', done='Initialized Chromedriver'): ---> 40 super().init( 41 service=self.manager.service,

9 frames FileNotFoundError: [Errno 2] No such file or directory: '/root/.local/share/undetected_chromedriver/undetected/chromedriver-linux64/chromedriver' -> '/root/.local/share/undetected_chromedriver/undetected_chromedriver'

The above exception was the direct cause of the following exception:

StartingChromeDriverError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/google_colab_selenium/undetected_chromedriver.py in init(self, options, keep_alive) 45 46 except Exception as e: ---> 47 raise StartingChromeDriverError(""" 48 Failed to start ChromeDriver. This could be due to a number 49 of factors, such as missing dependencies or incorrect

StartingChromeDriverError: Failed to start ChromeDriver. This could be due to a number of factors, such as missing dependencies or incorrect configuration settings.

Does this allow for running multiple pages at the same time? Thanks a lot.

jpjacobpadilla commented 3 months ago

I've never seen that error before. Do you mind sending an example Notebook recreating the issue?

komplykated commented 3 months ago

Yes Sir, here is the file HA_202407_testing.zip

jpjacobpadilla commented 3 months ago

Thanks for the example notebook. I'll try to fix it this weekend!

komplykated commented 3 months ago

Thanks for the example notebook. I'll try to fix it this weekend!

thank bro

jpjacobpadilla commented 3 months ago

This issue is essentially just a race condition. I've released a new version of the package (1.0.14) which makes this Google-Colab-Selenium thread-safe!

komplykated commented 3 months ago

This issue is essentially just a race condition. I've released a new version of the package (1.0.14) which makes this Google-Colab-Selenium thread-safe!

It works. Thanks a lot.