{"record":{"id":"70eaaf7c3e1abf2a","repo":"keras-team/keras","slug":"variable-is-not-properly-initialized-raw-value-mi-70eaaf","errorCode":null,"errorMessage":"Variable is not properly initialized (raw_value missing) and has no initializer.","messagePattern":"Variable is not properly initialized \\(raw_value missing\\) and has no initializer\\.","errorType":"exception","errorClass":"AttributeError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/jax/ops/core.py","lineNumber":287,"sourceCode":"\n        @property\n        def value(self):\n            if in_stateless_scope():\n                scope = get_stateless_scope()\n                stateless_value = scope.get_current_value(self)\n                if stateless_value is not None:\n                    return self._maybe_autocast(stateless_value)\n            current_value = _get_raw_value(self)\n            if current_value is None:\n                # Uninitialized variable (created under a stateless scope,\n                # which defers initialization). Return a placeholder, like\n                # `KerasVariable.value`, without mutating the variable.\n                if self._initializer is not None:\n                    return self._maybe_autocast(\n                        self._initializer(self._shape, dtype=self._dtype)\n                    )\n                else:\n                    raise AttributeError(\n                        \"Variable is not properly initialized (raw_value \"\n                        \"missing) and has no initializer.\"\n                    )\n            if (\n                hasattr(self, \"_var_metadata\")\n                and \"on_get_value\" in self._var_metadata\n            ):\n                current_value = self._var_metadata[\"on_get_value\"](\n                    self, current_value\n                )\n            return self._maybe_autocast(current_value)\n\n    Variable = NnxVariable\n\n    def _flatten_nnx_variable(variable):\n        children = (_get_raw_value(variable),)\n        # We copy __dict__ to avoid side effects\n        keras_state = variable.__dict__.copy()","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/jax/ops/core.py#L269-L305","documentation":"Error \"Variable is not properly initialized (raw_value missing) and has no initializer.\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/backend/jax/ops/core.py:287 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":"7a34a03db60bf60042242d6a556fc3be119046a5","analyzedAt":"2026-08-25T21:25:25.994Z","schemaVersion":2},"datasetVersion":"2026-08-26T02:17:13.382Z"}