ruvnet/RuView · error · ValueError
Missing required configuration: {missing_fields}
Error message
Missing required configuration: {missing_fields} What it means
CSIExtractor._validate_config requires four keys — hardware_type, sampling_rate, buffer_size, timeout — and raises ValueError listing the missing ones. It is a fail-fast completeness check run at construction, so a partial YAML/JSON config or a programmatically built dict missing any field aborts before hardware setup.
Source
Thrown at archive/v1/src/hardware/csi_extractor.py:473
elif self.hardware_type == 'router':
self.parser = RouterCSIParser()
else:
raise ValueError(f"Unsupported hardware type: {self.hardware_type}")
def _validate_config(self, config: Dict[str, Any]) -> None:
"""Validate configuration parameters.
Args:
config: Configuration to validate
Raises:
ValueError: If configuration is invalid
"""
required_fields = ['hardware_type', 'sampling_rate', 'buffer_size', 'timeout']
missing_fields = [field for field in required_fields if field not in config]
if missing_fields:
raise ValueError(f"Missing required configuration: {missing_fields}")
if config['sampling_rate'] <= 0:
raise ValueError("sampling_rate must be positive")
if config['buffer_size'] <= 0:
raise ValueError("buffer_size must be positive")
if config['timeout'] <= 0:
raise ValueError("timeout must be positive")
async def connect(self) -> bool:
"""Establish connection to CSI hardware.
Returns:
True if connection successful, False otherwise
"""
try:
success = await self._establish_hardware_connection()View on GitHub (pinned to 4685618388)
Solutions
- Add all four keys with valid values to the extractor config (see exampleFix)
- Pre-check completeness with the same key list before constructing CSIExtractor (see validationCode)
- Centralize config defaults in one loader so every source produces the full key set
Example fix
# before
config = {'hardware_type': 'esp32', 'sampling_rate': 100} # ValueError: Missing required configuration: ['buffer_size', 'timeout']
# after
config = {
'hardware_type': 'esp32',
'sampling_rate': 100,
'buffer_size': 1024,
'timeout': 5.0,
} Defensive patterns
Strategy: validation
Validate before calling
REQUIRED = ('hardware_type', 'sampling_rate', 'buffer_size', 'timeout')
def validate_extractor_config(config: dict) -> None:
missing = [k for k in REQUIRED if k not in config]
if missing:
raise ValueError(f'Missing required configuration: {missing}') Type guard
def is_complete_config(config) -> bool:
return isinstance(config, dict) and all(k in config for k in ('hardware_type', 'sampling_rate', 'buffer_size', 'timeout')) Try / catch
try:
extractor = CSIExtractor(config)
except ValueError as e:
raise SystemExit(f'extractor config invalid: {e}') from e Prevention
- Validate the four required keys at config load with the same key list the extractor uses
- Keep one canonical config template containing every required key
- After config refactors, grep old key names in deployment configs to catch stale fields
When it happens
Trigger: A config file that omits timeout (or any of the four keys); a merge step dropping a key; copying a minimal example config that only shows a subset of required fields.
Common situations: Example configs showing only a few keys; refactors renaming keys (e.g. rate to sampling_rate) leaving stale keys in existing user configs; expecting implicit defaults that the extractor does not provide.
Related errors
- sampling_rate must be positive
- buffer_size must be positive
- timeout must be positive
- Unsupported host: ${name}
- Unsupported hardware type: {self.hardware_type}
AI-assisted analysis of ruvnet/RuView@4685618388 (2026-08-16).
Data as JSON: /api/errors/948c152dcb5be264.
Report an issue: GitHub.