{"record":{"id":"7bbe855393668e16","repo":"HKUDS/nanobot","slug":"pyjwt-not-installed-run-nanobot-plugins-enable-m","errorCode":null,"errorMessage":"PyJWT not installed. Run: nanobot plugins enable msteams","messagePattern":"PyJWT not installed\\. Run: nanobot plugins enable msteams","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"nanobot/channels/msteams/runtime.py","lineNumber":475,"sourceCode":"                if quoted and reply and len(reply) <= 160:\n                    return self._format_reply_with_quote(quoted, reply)\n\n        return cleaned\n\n    def _format_reply_with_quote(self, quoted: str, reply: str) -> str:\n        \"\"\"Format a reply-with-context message for the model without Teams wrapper noise.\"\"\"\n        quoted = quoted.strip()\n        reply = reply.strip()\n        if quoted and reply:\n            return f\"User is replying to: {quoted}\\nUser reply: {reply}\"\n        if reply:\n            return reply\n        return quoted\n\n    async def _validate_inbound_auth(self, auth_header: str, activity: dict[str, Any]) -> None:\n        \"\"\"Validate inbound Bot Framework bearer token.\"\"\"\n        if not MSTEAMS_AVAILABLE:\n            raise RuntimeError(\"PyJWT not installed. Run: nanobot plugins enable msteams\")\n\n        if not auth_header.lower().startswith(\"bearer \"):\n            raise ValueError(\"missing bearer token\")\n\n        token = auth_header.split(\" \", 1)[1].strip()\n        if not token:\n            raise ValueError(\"empty bearer token\")\n\n        header = jwt.get_unverified_header(token)\n        kid = str(header.get(\"kid\") or \"\").strip()\n        if not kid:\n            raise ValueError(\"missing token kid\")\n\n        jwks = await self._get_botframework_jwks()\n        keys = cast(list[dict[str, Any]], jwks.get(\"keys\") or [])\n        jwk = next((key for key in keys if key.get(\"kid\") == kid), None)\n        if not jwk:\n            raise ValueError(f\"signing key not found for kid={kid}\")","sourceCodeStart":457,"sourceCodeEnd":493,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/channels/msteams/runtime.py#L457-L493","documentation":"Error \"PyJWT not installed. Run: nanobot plugins enable msteams\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/channels/msteams/runtime.py:475 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"}