{"record":{"id":"a20ed21557bbf392","repo":"HKUDS/nanobot","slug":"qq-client-not-initialized","errorCode":null,"errorMessage":"QQ client not initialized","messagePattern":"QQ client not initialized","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"nanobot/channels/qq/runtime.py","lineNumber":303,"sourceCode":"                await self._client.close()\n        self._client = None\n\n        if self._http:\n            with suppress(Exception):\n                await self._http.close()\n        self._http = None\n\n        self.logger.info(\"bot stopped\")\n\n    # ---------------------------\n    # Outbound (send)\n    # ---------------------------\n\n    async def send(self, msg: OutboundMessage) -> None:\n        \"\"\"Send attachments first, then text.\"\"\"\n        try:\n            if not self._client:\n                raise RuntimeError(\"QQ client not initialized\")\n\n            msg_id = msg.metadata.get(\"message_id\")\n            chat_type = self._chat_type_cache.get(msg.chat_id, \"c2c\")\n            is_group = chat_type == \"group\"\n\n            # 1) Send media\n            for media_ref in msg.media or []:\n                ok = await self._send_media(\n                    chat_id=msg.chat_id,\n                    media_ref=media_ref,\n                    msg_id=msg_id,\n                    is_group=is_group,\n                )\n                if not ok:\n                    filename = (\n                        os.path.basename(urlparse(media_ref).path)\n                        or os.path.basename(media_ref)\n                        or \"file\"","sourceCodeStart":285,"sourceCodeEnd":321,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/channels/qq/runtime.py#L285-L321","documentation":"Error \"QQ client not initialized\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/channels/qq/runtime.py:303 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}