{"record":{"id":"6ca99ceb37d79004","repo":"reflex-dev/reflex","slug":"f-config-file-not-found-at-yaml-path","errorCode":null,"errorMessage":"f\"Config file not found at {yaml_path}.\"","messagePattern":"f\"Config file not found at (.+?)\\.\"","errorType":"validation","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"packages/reflex-hosting-cli/src/reflex_cli/core/config.py","lineNumber":214,"sourceCode":"        cls,\n        yaml_path: Path = Path.cwd() / constants.Dirs.CLOUD_YAML,\n        env: str | None = None,\n    ) -> Config:\n        \"\"\"Creates a Config instance from a YAML file.\n\n        Args:\n            yaml_path: The path to the YAML file. Defaults to \"cloud.yml\" in the current directory.\n            env: The environment to load the config for.\n\n        Returns:\n            Config: A Config instance with the values from the YAML file.\n\n        Raises:\n            ConfigError: If the YAML file is not found.\n\n        \"\"\"\n        if not yaml_path.exists():\n            raise ConfigError(f\"Config file not found at {yaml_path}.\")\n\n        try:\n            import yaml\n        except ImportError as e:\n            raise ConfigError(\n                \"YAML support is not available. Please install PyYAML to use this feature.\"\n            ) from e\n\n        with yaml_path.open() as file:\n            data = yaml.safe_load(file)\n            if env:\n                data = data.get(\"env\", {}).get(env, {})\n            data = cls._filter_dict(data)\n        return cls(_cloud_config_path=yaml_path, **data)\n\n    @classmethod\n    def from_toml(\n        cls,","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/reflex-dev/reflex/blob/45b8ed5ab735f8a56bbb09a42384f030eb0208e7/packages/reflex-hosting-cli/src/reflex_cli/core/config.py#L196-L232","documentation":"ConfigError raised by CloudConfig.from_yaml when the given YAML path does not exist on disk. The CLI loads its cloud config from rxconfig.yaml by default, so this means the config file is missing at the expected location.","triggerScenarios":"Calling CloudConfig.from_yaml(path) with a non-existent path, or running a hosting CLI command that resolves the config path (from_yaml_or_toml_or_none / read_config) to a YAML file that was deleted or never created.","commonSituations":"Running hosting commands in a fresh project where rxconfig.yaml hasn't been generated yet; passing a custom --configfile path with a typo; the file being removed by a clean/git operation.","solutions":["Create the YAML config file at the reported path (or run the CLI from the project root so it generates one)","Check the path for typos, especially with a custom --configfile argument","If you intended TOML config, ensure the CLI resolves to pyproject.toml instead, or create rxconfig.yaml"],"exampleFix":"# before\nconfig = CloudConfig.from_yaml(Path(\"rxconf.yaml\"))  # typo\n\n# after\nconfig = CloudConfig.from_yaml(Path(\"rxconfig.yaml\"))","handlingStrategy":"validation","validationCode":"from pathlib import Path\nyaml_path = Path(\"rxconfig.yaml\")\nif not yaml_path.exists():\n    raise FileNotFoundError(f\"missing {yaml_path}\")\nconfig = CloudConfig.from_yaml(yaml_path)","typeGuard":null,"tryCatchPattern":"from reflex_cli.core.config import ConfigError\ntry:\n    config = CloudConfig.from_yaml(path)\nexcept ConfigError as e:\n    if \"not found\" in str(e):\n        config = CloudConfig()  # fall back to defaults\n    else:\n        raise","preventionTips":["Check path.exists() before calling from_yaml","Create rxconfig.yaml in your project root before first deploy","Use absolute paths resolved from the project root"],"tags":["config","file-not-found","yaml","reflex-hosting-cli"],"backgroundTag":"config-file-not-found","analyzedSha":"45b8ed5ab735f8a56bbb09a42384f030eb0208e7","analyzedAt":"2026-08-28T19:25:27.644Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}