{"record":{"id":"bf89a44eb6fadee6","repo":"langchain-ai/langgraph","slug":"pycryptodome-is-not-installed-please-install-it-w","errorCode":null,"errorMessage":"Pycryptodome is not installed. Please install it with `pip install pycryptodome`.","messagePattern":"Pycryptodome is not installed\\. Please install it with `pip install pycryptodome`\\.","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"libs/checkpoint/langgraph/checkpoint/serde/encrypted.py","lineNumber":46,"sourceCode":"        # unencrypted data\n        if \"+\" not in enc_cipher:\n            return self.serde.loads_typed(data)\n        # extract cipher name\n        typ, ciphername = enc_cipher.split(\"+\", 1)\n        # decrypt data\n        decrypted_data = self.cipher.decrypt(ciphername, ciphertext)\n        # deserialize data\n        return self.serde.loads_typed((typ, decrypted_data))\n\n    @classmethod\n    def from_pycryptodome_aes(\n        cls, serde: SerializerProtocol = JsonPlusSerializer(), **kwargs: Any\n    ) -> \"EncryptedSerializer\":\n        \"\"\"Create an `EncryptedSerializer` using AES encryption.\"\"\"\n        try:\n            from Crypto.Cipher import AES\n        except ImportError:\n            raise ImportError(\n                \"Pycryptodome is not installed. Please install it with `pip install pycryptodome`.\"\n            ) from None\n\n        # check if AES key is provided\n        if \"key\" in kwargs:\n            key: bytes = kwargs.pop(\"key\")\n        else:\n            key_str = os.getenv(\"LANGGRAPH_AES_KEY\")\n            if key_str is None:\n                raise ValueError(\"LANGGRAPH_AES_KEY environment variable is not set.\")\n            key = key_str.encode()\n            if len(key) not in (16, 24, 32):\n                raise ValueError(\"LANGGRAPH_AES_KEY must be 16, 24, or 32 bytes long.\")\n\n        # set default mode to EAX if not provided\n        if kwargs.get(\"mode\") is None:\n            kwargs[\"mode\"] = AES.MODE_EAX\n","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/checkpoint/langgraph/checkpoint/serde/encrypted.py#L28-L64","documentation":"Error \"Pycryptodome is not installed. Please install it with `pip install pycryptodome`.\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/checkpoint/langgraph/checkpoint/serde/encrypted.py:46 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":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}