-
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't figure out why i get this error #18
Comments
Did you ever figure this out? I'm having the same issue |
yes same issue here |
Here’s how you should initialize your Chrome WebDriver with the Service object and options: class EasyApplyLinkedin:
|
I get the following error when i run the main.py after setting up my config file:
AttributeError: 'str' object has no attribute 'capabilities'
{ "email" : "mmhogsett@gmail.com", "password" : "xxx", "keywords" : "Python", "location" : "Worldwide", "driver_path" : "C:/Users/micha/PycharmProjects/EasyApply-Linkedin/driver/chromedriver-win64/chromedriver.exe" }
ive tried using this instead:
{ "email" : "mmhogsett@gmail.com", "password" : "xxx", "keywords" : "Python", "location" : "Worldwide", "driver_path" : "driver/chromedriver-win64/chromedriver.exe" }
code is the same as yours:
`from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException, ElementClickInterceptedException, NoSuchElementException
from selenium.webdriver.common.action_chains import ActionChains
import time
import re
import json
class EasyApplyLinkedin:
if name == 'main':
complete error message is:
`C:\Users\micha\AppData\Local\Microsoft\WindowsApps\python3.9.exe C:\Users\micha\PycharmProjects\EasyApply-Linkedin\main.py
Traceback (most recent call last):
File "C:\Users\micha\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\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 "C:\Users\micha\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\common\selenium_manager.py", line 75, 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 "C:\Users\micha\PycharmProjects\EasyApply-Linkedin\main.py", line 178, in
bot = EasyApplyLinkedin(data)
File "C:\Users\micha\PycharmProjects\EasyApply-Linkedin\main.py", line 21, in init
self.driver = webdriver.Chrome(data['driver_path'])
File "C:\Users\micha\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in init
super().init(
File "C:\Users\micha\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\chromium\webdriver.py", line 51, in init
self.service.path = DriverFinder.get_path(self.service, options)
File "C:\Users\micha\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\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'
Process finished with exit code 1
`
The text was updated successfully, but these errors were encountered: