Selenium webdriver error

sanjaya
I am trying to execute below code. getting error ...... *** AttributeError: 'NoneType' object has no attribute 'to_capabilities'

FYI having below versions of chrome browser and chrome driver

Chrome Version - 124.0.6367.119 (Official Build) (64-bit)

ChromeDriver version - 124.0.6367.91

=================
from kiteconnect import KiteConnect
from selenium import webdriver

token_path = "api_key.txt"
key_secret = open(token_path,'r').read().split()
kite = KiteConnect(api_key = key_secret[0])
service = webdriver.chrome.service.Service('./chromedriver')
service.start()
options = webdriver.ChromeOptions()
options = options.to_capabilities()
driver = webdriver.Remote(service.service_url,options)
driver.get(kite.login_url())
This discussion has been closed.