Fix of "OSError: [WinError 6] The handle is invalid"
This error seems to be a problem for a lot of users of the package. Adding a try-except block is solving the issue for them while keeping it functional for the others as well. Source: https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/955
This commit is contained in:
parent
1c704a71cf
commit
35c6e786ef
|
@ -782,7 +782,11 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|||
else:
|
||||
logger.debug("successfully removed %s" % self.user_data_dir)
|
||||
break
|
||||
|
||||
try:
|
||||
time.sleep(0.1)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
# dereference patcher, so patcher can start cleaning up as well.
|
||||
# this must come last, otherwise it will throw 'in use' errors
|
||||
|
|
Loading…
Reference in New Issue