I am opening chrome webdriver in python.It is working fine when i am not opening via function.With function is say some permission issue and i have administration access :-
url=['https://www.youtube.com/results?search_query=free+code+camp']
def main1():
try:
driver = webdriver.Chrome('chromedriver.exe')
driver.get(url[0])
driver.implicitly_wait(10)
except Exception as e:
print(e)
main1()
Without function is it working. Webdriver open and after few second i got this issue :-
Traceback (most recent call last):
File "C:\Users\asus\anaconda3\envs\Jinja2_sample1\lib\subprocess.py", line 788, in __del__
self._internal_poll(_deadstate=_maxsize)
File "C:\Users\asus\anaconda3\envs\Jinja2_sample1\lib\subprocess.py", line 1055, in _internal_poll
if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0:
PermissionError: [WinError 5] Access is denied