crawl4ai icon indicating copy to clipboard operation
crawl4ai copied to clipboard

chrome driver error on cloud

Open jason-jos opened this issue 2 years ago • 3 comments

I am trying to run a simple crawler in lightning.ai and getting a Chrome driver error even though I installed Chrome driver.

[LOG] 🚀 Initializing LocalSeleniumCrawlerStrategy
/bin/sh: 1: google-chrome: not found
/bin/sh: 1: google-chrome-stable: not found
/bin/sh: 1: google-chrome-beta: not found
/bin/sh: 1: google-chrome-dev: not found
/bin/sh: 1: google-chrome: not found
/bin/sh: 1: google-chrome-stable: not found
/bin/sh: 1: google-chrome-beta: not found
/bin/sh: 1: google-chrome-dev: not found
Traceback (most recent call last):
  File "/teamspace/studios/this_studio/crawl4ai/crawl4ai/app.py", line 4, in <module>
    crawler = WebCrawler()
  File "/teamspace/studios/this_studio/crawl4ai/crawl4ai/crawl4ai/web_crawler.py", line 27, in __init__
    self.crawler_strategy = crawler_strategy or LocalSeleniumCrawlerStrategy(verbose=verbose)
  File "/teamspace/studios/this_studio/crawl4ai/crawl4ai/crawl4ai/crawler_strategy.py", line 140, in __init__
    chromedriver_path = ChromeDriverManager().install()
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/webdriver_manager/chrome.py", line 40, in install
    driver_path = self._get_driver_binary_path(self.driver)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/webdriver_manager/core/manager.py", line 40, in _get_driver_binary_path
    file = self._download_manager.download_file(driver.get_driver_download_url(os_type))
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/webdriver_manager/drivers/chrome.py", line 32, in get_driver_download_url
    driver_version_to_download = self.get_driver_version_to_download()
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/webdriver_manager/core/driver.py", line 48, in get_driver_version_to_download
    return self.get_latest_release_version()
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/webdriver_manager/drivers/chrome.py", line 64, in get_latest_release_version
    determined_browser_version = ".".join(determined_browser_version.split(".")[:3])
AttributeError: 'NoneType' object has no attribute 'split'```

jason-jos avatar Jul 10 '24 08:07 jason-jos

+1

doublegssc avatar Jul 10 '24 08:07 doublegssc

@doublegssc @xarchangel12 If you encounter problems installing Chrome driver on Linux, please check the Dockerfile in the root folder for guidance on the correct installation procedure. I may consider adding this information to the document or creating a dedicated script for Chrome installation. @xwt1 Thank you for sharing your suggestion. Your input is appreciated.

unclecode avatar Jul 12 '24 06:07 unclecode