g1879 / DrissionPage

Python based web automation tool. Powerful and elegant.
https://DrissionPage.cn/
BSD 3-Clause "New" or "Revised" License
8.24k stars 779 forks source link

在执行 page.quit() 操作时,会出现TimeoutError #370

Open yanlc39 opened 2 months ago

yanlc39 commented 2 months ago
ENV: Python 3.8.18 (arm64)
DrissionPage: 4.0.5.6
ChromeVer: 128.0.6613.120 (arm64)

Error:

Exception ignored in: <function TalentClient.__del__ at 0x1409eb8b0>
Traceback (most recent call last):
  File "/path/to/main/app/file.py", line 65, in __del__
  File "/path/to/python3.8/site-packages/DrissionPage/_pages/chromium_page.py", line 270, in quit
  File "/path/to/python3.8/site-packages/DrissionPage/_base/browser.py", line 234, in quit
  File "/path/to/python3.8/site-packages/DrissionPage/_base/browser.py", line 121, in run_cdp
  File "/path/to/python3.8/site-packages/DrissionPage/_functions/tools.py", line 241, in raise_error
TimeoutError: 
错误:timeout
方法:Browser.close
参数:{'_timeout': 30}
版本:4.0.5.6
出现这个错误可能意味着程序有bug,请把错误信息和重现方法告知作者,谢谢。
报告网站:https://gitee.com/g1879/DrissionPage/issues

quit操作位于函数__def__,即使出现了上述错误也可以实现关闭了浏览器的目的。当操作移至常规函数体中便不会出现以上问题。