crawl4ai
crawl4ai copied to clipboard
chrome driver error on cloud
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'```
+1
@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.