Open JingHai-Lingyun opened 2 weeks ago
Error Log:
d:\projects\!0-Informality-dev\Python\WxMessageRobot\.venv\Lib\site-packages\pywinauto\__init__.py:80: UserWarning: Revert to STA COM threading mode warnings.warn("Revert to STA COM threading mode", UserWarning) 2024-11-02 14:46:02.317 WeChatType.py[273] GetAllMessage -> Find Control Timeout(10s): {Name: '消息', ControlType: ListControl} --------------------------------------------------------------------------- LookupError Traceback (most recent call last) Cell In[1], [line 6](vscode-notebook-cell:?execution_count=1&line=6) [3](vscode-notebook-cell:?execution_count=1&line=3) wx = WeChat() [5](vscode-notebook-cell:?execution_count=1&line=5) with open("message.txt", "w", encoding="utf-8") as f: ----> [6](vscode-notebook-cell:?execution_count=1&line=6) for msg in wx.GetAllMessage: [7](vscode-notebook-cell:?execution_count=1&line=7) f.write(f"{'系统信息' if msg[0] == 'SYS' else msg[0] + ' 说'}:\n") [8](vscode-notebook-cell:?execution_count=1&line=8) f.write(" " + msg[1] + "\n") File d:\projects\!0-Informality-dev\Python\WxMessageRobot\.venv\Lib\site-packages\PyOfficeRobot\core\WeChatType.py:273, in WeChat.GetAllMessage(self) [271](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/PyOfficeRobot/core/WeChatType.py:271) '''获取当前窗口中加载的所有聊天记录''' [272](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/PyOfficeRobot/core/WeChatType.py:272) MsgDocker = [] --> [273](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/PyOfficeRobot/core/WeChatType.py:273) MsgItems = self.MsgList.GetChildren() [274](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/PyOfficeRobot/core/WeChatType.py:274) for MsgItem in MsgItems: [275](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/PyOfficeRobot/core/WeChatType.py:275) MsgDocker.append(WxUtils.SplitMessage(MsgItem)) File d:\projects\!0-Informality-dev\Python\WxMessageRobot\.venv\Lib\site-packages\uiautomation\uiautomation.py:6554, in Control.GetChildren(self) [6550](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/uiautomation/uiautomation.py:6550) """ [6551](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/uiautomation/uiautomation.py:6551) Return List[Control], a list of `Control` subclasses. [6552](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/uiautomation/uiautomation.py:6552) """ [6553](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/uiautomation/uiautomation.py:6553) children = [] -> [6554](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/uiautomation/uiautomation.py:6554) child = self.GetFirstChildControl() [6555](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/uiautomation/uiautomation.py:6555) while child: [6556](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/uiautomation/uiautomation.py:6556) children.append(child) ... -> [6684](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/uiautomation/uiautomation.py:6684) raise LookupError('Find Control Timeout({}s): {}'.format(maxSearchSeconds, self.GetSearchPropertiesStr())) [6685](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/uiautomation/uiautomation.py:6685) else: [6686](file:///D:/projects/!0-Informality-dev/Python/WxMessageRobot/.venv/Lib/site-packages/uiautomation/uiautomation.py:6686) return False LookupError: Find Control Timeout(10s): {Name: '消息', ControlType: ListControl}
Error Log: