#๐Ÿ”’ help with selenium on a raspberry pi (Beginner)

9 messages ยท Page 1 of 1 (latest)

onyx pastureBOT
#

@plucky parcel

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

plucky parcel
#

error code:

Traceback (most recent call last):
  File "/home/Kevin/.local/lib/python3.9/site-packages/selenium/webdriver/common/driver_finder.py", line 38, in get_path
    path = SeleniumManager().driver_location(options) if path is None else path
  File "/home/Kevin/.local/lib/python3.9/site-packages/selenium/webdriver/common/selenium_manager.py", line 87, in driver_location
    browser = options.capabilities["browserName"]
AttributeError: 'str' object has no attribute 'capabilities'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/Kevin/Projects/opengoogle.py", line 7, in <module>
    driver = webdriver.Chrome('/usr/bin/chromedriver')
  File "/home/Kevin/.local/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/home/Kevin/.local/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py", line 49, in __init__
    self.service.path = DriverFinder.get_path(self.service, options)
  File "/home/Kevin/.local/lib/python3.9/site-packages/selenium/webdriver/common/driver_finder.py", line 40, in get_path
    msg = f"Unable to obtain driver for {options.capabilities['browserName']} using Selenium Manager."
AttributeError: 'str' object has no attribute 'capabilities'


------------------
(program exited with code: 1)
Press return to continue

#

my basic selenium code looks like this:

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait 
from selenium.webdriver.support import expected_conditions as EC
from time import sleep

driver = webdriver.Chrome('/usr/bin/chromedriver')

driver.get('https://www.google.com')
light cobalt
#

@plucky parcel

plucky parcel
#

thought I deleted this message

onyx pastureBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.