Hello!
I’d like to deploy my web app through the streamlit community cloud but I’m getting this error:
AttributeError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).
Traceback:
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 541, in _run_script
exec(code, module.__dict__)
File "/mount/src/corners-betting/CornersBetting.py", line 17, in <module>
mws = import_MyWebScrapingTools().MyWsTools()
File "MyWebscrapingTools.py", line 29, in __init__
self.driver = init_driver()
File "MyWebscrapingTools.py", line 25, in init_driver
chrome_service = Service(ChromeDriverManager().install())
File "/home/adminuser/venv/lib/python3.9/site-packages/webdriver_manager/chrome.py", line 40, in install
driver_path = self._get_driver_binary_path(self.driver)
File "/home/adminuser/venv/lib/python3.9/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/adminuser/venv/lib/python3.9/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/adminuser/venv/lib/python3.9/site-packages/webdriver_manager/core/driver.py", line 48, in get_driver_version_to_download
return self.get_latest_release_version()
File "/home/adminuser/venv/lib/python3.9/site-packages/webdriver_manager/drivers/chrome.py", line 64, in get_latest_release_version
determined_browser_version = ".".join(determined_browser_version.split(".")[:3])
The app should perform some actions of webscraping with Selenium but to do so it need to execute a chromedriver.exe file.
I tried two ways to do it:
- Upload the latest chromdriver.exe in the GitHub repo and use the GitHub link as executable_path in webdriver.Chrome(executable_path) FAILS TO READ IT
- Use Service(ChromeDriverManager().install()) and try to automatically install the latest chromedriver.exe at any run. FAILS WITH THE ABOVE ERROR (and a question…where should install it?)
This is the link to the GitHub page. (Note that I use a custom module to speed up some webscraping actions but it’s just some functions built on top of selenium).
Do you know any solution?
TIA