0

Using the python + selenium chromedriver with a specific user folder to keep my cookies and settings saved with the following code:

chrome_options = Options()
chrome_options.add_argument("user-data-dir=cookies")    
driver = webdriver.Chrome("C:\Python\chromedriver\chromedriver.exe", options=chrome_options)

Everything used to work well, but had to reinstall Windows 10 machine and now everytime I run the script, there is an error "Google Chrome is not able to reach the data folder for reading nor writing" (not these words exactly - translated).

I noticed that all windows folders are set to read only and am not able to change it (using admin account).The controlled folder access in windows settings is turned off.

Has anyone been dealing with the same problem?

Atul KS
  • 908
  • 11
  • 21

1 Answers1

0

How are you running Selenium? From Powershell/CMD? These sometimes needs to be run as admin.. Right click => Run as Administrator.

You can create a .bat file or similiar and change the properties to always run as admin.

Kim Kakan Andersson
  • 548
  • 1
  • 5
  • 15
  • I tried to start CMD as admin and then I started my script. The chromedriver started but reported another error "DevToolsActivePort file doesn't exist"... still trying to figure it out – Archer Sterling Apr 28 '21 at 21:25