UsergeTeam / Userge-Plugins

Plugins for Userge
https://userge.tech
GNU General Public License v3.0
135 stars 328 forks source link

fix error custom path for GOOGLE_CHROME_DRIVER #298

Closed alamia442 closed 2 years ago

alamia442 commented 2 years ago

logger : #TRACEBACK

PLUGIN : userge.plugins.utils.webss.main FUNCTION : _webss ERROR : Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home

Traceback (most recent call last): File "/opt/venv/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 71, in start self.process = subprocess.Popen(cmd, env=self.env, File "/usr/local/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/userge/core/methods/decorators/raw_decorator.py", line 327, in template await func(types.bound.Message.parse( File "/app/userge/plugins/utils/webss/main.py", line 45, in _webss driver = webdriver.Chrome(chrome_options=chrome_options) File "/opt/venv/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 70, in init super(WebDriver, self).init(DesiredCapabilities.CHROME['browserName'], "goog", File "/opt/venv/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py", line 89, in init self.service.start() File "/opt/venv/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 81, in start raise WebDriverException( selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home

pep8speaks commented 2 years ago

@alamia442, Thanks for opening this PR.

Line 45:101: E501 line too long (106 > 100 characters)