> ## Documentation Index
> Fetch the complete documentation index at: https://docs.narrative.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Empty Scope Configuration

> A scope must have at least one of enabled_stats or meaningful stat_options

## Error message

```
{context}: scope must have at least one of enabled_stats or stat_options
```

## When this error occurs

The `scope` field within a namespace (`dataset.scope` or `rosetta_stone.scope`) must contain at least one of:

* `enabled_stats` — an explicit stat set
* `stat_options` with at least one actual option (e.g., `histogram` with tuning parameters)

This error is raised when scope is present but effectively empty — for example, `stat_options: {}` with no `enabled_stats`, or `stat_options: { "histogram": null }`.

## Example: request that triggers this error

```json theme={null}
{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "scope": {
      "stat_options": {}
    }
  }
}
```

The scope has `stat_options` but no actual options inside it.

## How to fix

Add meaningful content to the scope:

```json theme={null}
"dataset": {
  "scope": {
    "enabled_stats": ["value_count", "null_value_count", "histogram"]
  }
}
```

Or provide actual stat options:

```json theme={null}
"dataset": {
  "scope": {
    "stat_options": {
      "histogram": { "max_bins": 200 }
    }
  }
}
```

If you don't need a scope override, remove the `scope` field and use `fields` only, or remove the namespace entirely.

## Related errors

* [DefaultsMissingEnabledStats](/reference/architecture/dataset-statistics/errors/defaults-missing-enabled-stats) — similar constraint at the defaults level
* [EmptyNamespace](/reference/architecture/dataset-statistics/errors/empty-namespace) — the namespace itself is empty
