Exception in thread Thread-2: Traceback (most recent call last): File "C:\Users\11834\miniconda3\envs\cv2_cp38\lib\threading.py", line 932, in _bootstrap_inner self.run() File "ICP.py", line 197, in run self.workType1() File "ICP.py", line 35, in workType1 dt = self.openBrowserAndLoadPath() File "ICP.py", line 181, in openBrowserAndLoadPath dt.OpenBrowser(index, proxy) File "C:\Users\11834\Desktop\icpTool\Ahao_ToolsForThis.py", line 329, in OpenBrowser self.browser.set_window_position(4 + int(index % 2) * 894, 4 + int((index - 0.1) / 2) * 1) File "C:\Users\11834\miniconda3\envs\cv2_cp38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 1131, in set_window_position return self.set_window_rect(x=int(x), y=int(y)) File "C:\Users\11834\miniconda3\envs\cv2_cp38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 1180, in set_window_rect return self.execute(Command.SET_WINDOW_RECT, {"x": x, "y": y, File "C:\Users\11834\miniconda3\envs\cv2_cp38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\11834\miniconda3\envs\cv2_cp38\lib\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: cannot determine loading status from no such window (Session info: chrome=114.0.5735.110)
时间: 2023-08-09 07:10:56 浏览: 65
这是一个使用Python编写的多线程程序,其中一个线程在执行时出现了异常。异常信息显示该线程在使用Selenium打开浏览器,并尝试设置浏览器窗口的位置时出现了错误。具体来说,Selenium无法确定当前窗口的状态,可能是因为该窗口不存在或未能成功加载。建议检查程序中关于浏览器窗口的相关代码,确保窗口已经成功打开并加载完成。
相关问题
Exception in thread Thread-2: Traceback (most recent call last): Exception in thread Thread-6:
很抱歉,但是根据提供的引用内容,我无法回答你的问题。引用内容中的错误信息是Python中的异常信息,它指示了在多线程编程中出现了错误。具体的错误原因需要查看代码的上下文和调用栈来确定。请提供更多的信息或者代码上下文,以便我能够更好地帮助你解决问题。
#### 引用[.reference_title]
- *1* [解决pythonTimer报错:Exception in thread Thread-1:Traceback most recent call last](https://blog.csdn.net/weixin_45386875/article/details/113828730)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
Exception in thread Thread-1: Traceback (most recent call last):
引用: Exception in thread Thread-1: Traceback most recent call last.
引用: Exception in thread Thread-1: Traceback (most recent call last): File “D:\Python37\lib\threading.py”, line 917, in _bootstrap_inner self.run() File “D:\Python37\lib\threading.py”, line 1158, in run self.function(*self.args, **self.kwargs) TypeError: ‘NoneType’ object is not callable.
引用: t=Timer(timer_interval,clearTwoBlock())#定时函数
当你得到异常 "Exception in thread Thread-1: Traceback (most recent call last)" 时,这表示在线程 Thread-1 中发生了一个异常,最近的调用发生了错误。
在引用中,异常的具体信息是:"File “D:\Python37\lib\threading.py”, line 917, in _bootstrap_inner self.run() File “D:\Python37\lib\threading.py”, line 1158, in run self.function(*self.args, **self.kwargs) TypeError: ‘NoneType’ object is not callable"。这个错误的意思是在线程运行的过程中,执行的函数为 NoneType 对象,而 NoneType 对象是不可调用的,因此会引发 TypeError。
在引用中,你可能在创建 Timer 对象时遇到了问题。根据提供的代码,你使用了 clearTwoBlock() 作为定时函数,但是你应该只传递函数名,而不是通过函数调用。正确的写法应该是:t=Timer(timer_interval, clearTwoBlock)。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)