pydoll
pydoll copied to clipboard
NotADirectoryError
Exception ignored in: <finalize object at 0x202fff1e920; dead> Traceback (most recent call last): File "D:\software\python310\lib\weakref.py", line 591, in call return info.func(*info.args, **(info.kwargs or {})) File "D:\software\python310\lib\tempfile.py", line 859, in _cleanup cls._rmtree(name, ignore_errors=ignore_errors) File "D:\software\python310\lib\tempfile.py", line 855, in _rmtree _shutil.rmtree(name, onerror=onerror) File "D:\software\python310\lib\shutil.py", line 750, in rmtree return _rmtree_unsafe(path, onerror) File "D:\software\python310\lib\shutil.py", line 615, in _rmtree_unsafe _rmtree_unsafe(fullname, onerror) File "D:\software\python310\lib\shutil.py", line 620, in _rmtree_unsafe onerror(os.unlink, fullname, sys.exc_info()) File "D:\software\python310\lib\tempfile.py", line 846, in onerror cls._rmtree(path, ignore_errors=ignore_errors) File "D:\software\python310\lib\tempfile.py", line 855, in _rmtree _shutil.rmtree(name, onerror=onerror) File "D:\software\python310\lib\shutil.py", line 750, in rmtree return _rmtree_unsafe(path, onerror) File "D:\software\python310\lib\shutil.py", line 601, in _rmtree_unsafe onerror(os.scandir, path, sys.exc_info()) File "D:\software\python310\lib\shutil.py", line 598, in _rmtree_unsafe with os.scandir(path) as scandir_it: NotADirectoryError: [WinError 267] 目录名称无效。: 'C:\Users\Admin\AppData\Local\Temp\tmp5fd8hgo0\BrowserMetrics\BrowserMetrics-67D21E59-2388.pma'
Hi @flyingantwjy , this is happening on Windows when exiting the context manager, right?
Thanks for replying. This is happening when I try to run the following script on my laptop with windows10: import asyncio from pydoll.browser.chrome import Chrome from pydoll.constants import By
async def main(): # Start the browser with no additional webdriver configuration! async with Chrome() as browser: await browser.start() page = await browser.get_page()
# Navigate through captcha-protected sites without worry
await page.go_to('https://example-with-cloudflare.com')
button = await page.find_element(By.CSS_SELECTOR, 'button')
await button.click()
asyncio.run(main())