I am unable to start chrome browser with selenium, when running the script in PyCharm, getting "DevToolsActivePort" file doesn't exist error, below is the stacktrace. When i execute the same script through Python IDLE, i am able to run with out any issue. I tried with chrome options but nothing is working. I dont understand why it is able to execute with Pythin IDLE and why not with PyCharm. i am not sure is there any different execution processes for both.It would be great if you can look into the issue.
i am using PyCharm Community Edition 2019.3.3_001 with Python 3.7
File "C:\Users\Shiva\AppData\Roaming\Python\Python37\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist
(Driver info: chromedriver=2.40.565498 (ea082db3280dd6843ebfb08a625e3eb905c4f5ab),platform=Windows NT 10.0.16299 x86_64)