{"record":{"id":"a0792bace85d5e2d","repo":"reflex-dev/reflex","slug":"f-invalid-self-cloud-config-path-name-str","errorCode":null,"errorMessage":"f\"Invalid {self._cloud_config_path.name}. \" + str(e)","messagePattern":"f\"Invalid (.+?)\\. \" \\+ str\\(e\\)","errorType":"validation","errorClass":"ConfigInvalidFieldValueError","httpStatus":null,"severity":"error","filePath":"packages/reflex-hosting-cli/src/reflex_cli/core/config.py","lineNumber":169,"sourceCode":"            ConfigInvalidFieldValueError: If any field value is invalid.\n\n        # noqa: DAR401\n\n        \"\"\"\n        evaluated_type = typing.get_type_hints(Config)\n        for field in dataclasses.fields(self):\n            if field.name.startswith(\"_\"):\n                continue\n            field_type = evaluated_type.get(field.name)\n            if field_type is None:\n                raise ConfigInvalidFieldValueError(f\"Invalid field: {field}\")\n            try:\n                _validate_dispatch(\n                    getattr(self, field.name), field_type, key=field.name\n                )\n            except ValueError as e:\n                if self._cloud_config_path:\n                    raise ConfigInvalidFieldValueError(\n                        f\"Invalid {self._cloud_config_path.name}. \" + str(e)\n                    ).with_traceback(e.__traceback__) from None\n\n    @classmethod\n    def _filter_dict(\n        cls,\n        data: dict[str, Any],\n    ) -> dict[str, Any]:\n        \"\"\"Filters a dictionary to only include fields defined in the Config class.\n\n        Args:\n            data: The dictionary to filter.\n\n        Returns:\n            dict[str, Any]: A filtered dictionary containing only valid Config fields.\n\n        \"\"\"\n        fields_keys = {field.name for field in dataclasses.fields(cls)}","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/reflex-dev/reflex/blob/45b8ed5ab735f8a56bbb09a42384f030eb0208e7/packages/reflex-hosting-cli/src/reflex_cli/core/config.py#L151-L187","documentation":"ConfigInvalidFieldValueError is raised in CloudConfig.__post_init__ when one of the config fields fails the _validate_dispatch validation. If the config was loaded from a file, the message is prefixed with the config filename so the user knows which file contains the bad value. It re-raises with the original traceback and suppresses the exception chain (from None) so only the wrapper error is shown.","triggerScenarios":"Constructing or loading a CloudConfig where a field value violates its declared type/validator, e.g. a non-integer vmtype, an invalid regions entry, or a malformed project name in rxconfig.yaml or pyproject.toml [tool.reflex-cloud]. Any CLI command that loads config (deploy, login-protected commands via read_config) hits this.","commonSituations":"Hand-editing rxconfig.yaml or pyproject.toml and introducing a typo or wrong type (e.g. regions: \"nyc\" as a string instead of a list, vmtype: \"large\" when only specific IDs are allowed); upgrading reflex-cli where a field's expected type changed.","solutions":["Check the field named in the message (str(e) suffix) and fix its value in the config file shown","Compare each entry in your rxconfig.yaml / [tool.reflex-cloud] section against the field types documented in reflex_cli.core.config","If unsure of allowed values, remove the offending key to fall back to its default","Re-run the CLI command to confirm validation passes"],"exampleFix":"# before (rxconfig.yaml)\nvmtype: large  # invalid value\nregions: nyc\n\n# after\nvmtype: 2\nregions:\n  - nyc","handlingStrategy":"validation","validationCode":"import tomllib, pathlib\np = pathlib.Path(\"pyproject.toml\")\ndata = tomllib.loads(p.read_text())[\"tool\"][\"reflex-cloud\"]\nfor k, v in data.items():\n    assert isinstance(v, (str, int, float, bool, list)), f\"field {k} has invalid type {type(v)}\"","typeGuard":"def looks_like_valid_cloud_config(data: dict) -> bool:\n    return isinstance(data, dict) and all(\n        isinstance(v, (str, int, float, bool, list, dict)) for v in data.values()\n    )","tryCatchPattern":null,"preventionTips":["Validate config values after editing rxconfig.yaml/pyproject.toml by loading the config once before running deploy","Keep field types matching the CloudConfig dataclass declarations","Avoid hand-editing config when a CLI command can set the value"],"tags":["config","validation","reflex-hosting-cli"],"backgroundTag":"config-validation-failed","analyzedSha":"45b8ed5ab735f8a56bbb09a42384f030eb0208e7","analyzedAt":"2026-08-28T19:25:27.644Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}