ruvnet/RuView · error · NotImplementedError
Pose estimation requires real CSI data input. No CSI data wa
Error message
Pose estimation requires real CSI data input. No CSI data was provided and mock_pose_data is disabled. Either pass csi_data from hardware collection, or enable mock_pose_data for development. See docs/hardware-setup.md for CSI data collection setup.
What it means
PoseService.estimate_poses() refuses to invent output: when csi_data is None and settings.mock_pose_data is False it raises NotImplementedError. The service can produce poses only from real CSI arrays (collected from configured ESP32 hardware) or, in development, from the explicit mock mode. Calling the estimation API with no input under production settings is treated as a programming/configuration error, with the remediation spelled out in the message.
Source
Thrown at archive/v1/src/services/pose_service.py:522
async def estimate_poses(self, zone_ids=None, confidence_threshold=None, max_persons=None,
include_keypoints=True, include_segmentation=False,
csi_data: Optional[np.ndarray] = None):
"""Estimate poses with API parameters.
Args:
zone_ids: List of zone identifiers to estimate poses for.
confidence_threshold: Minimum confidence threshold for detections.
max_persons: Maximum number of persons to return.
include_keypoints: Whether to include keypoint data.
include_segmentation: Whether to include segmentation masks.
csi_data: Real CSI data array. Required when mock_pose_data is False.
Raises:
NotImplementedError: If no CSI data is provided and mock mode is off.
"""
try:
if csi_data is None and not self.settings.mock_pose_data:
raise NotImplementedError(
"Pose estimation requires real CSI data input. No CSI data was provided "
"and mock_pose_data is disabled. Either pass csi_data from hardware "
"collection, or enable mock_pose_data for development. "
"See docs/hardware-setup.md for CSI data collection setup."
)
metadata = {
"timestamp": datetime.now(),
"zone_ids": zone_ids or ["zone_1"],
"confidence_threshold": confidence_threshold or self.settings.pose_confidence_threshold,
"max_persons": max_persons or self.settings.pose_max_persons,
}
if csi_data is not None:
# Process real CSI data
result = await self.process_csi_data(csi_data, metadata)
else:
# Mock mode: generate mock poses directly (no fake CSI data)View on GitHub (pinned to 4685618388)
Solutions
- Pass real CSI data: obtain the ndarray from hardware collection and call estimate_poses(csi_data=csi_array, ...).
- For local development, enable mock_pose_data=True in settings so empty-input calls are allowed.
- Fix upstream collectors to raise on failure instead of forwarding None, so this guard never triggers.
- Follow docs/hardware-setup.md to configure the CSI data source for real estimation.
Example fix
# before
result = await pose_service.estimate_poses() # NotImplementedError
# after
if csi_data is None and not pose_service.settings.mock_pose_data:
raise ValueError('csi_data is required when mock_pose_data is disabled')
result = await pose_service.estimate_poses(csi_data=csi_data) Defensive patterns
Strategy: validation
Validate before calling
if csi_data is None and not pose_service.settings.mock_pose_data:
raise ValueError('csi_data required when mock_pose_data is disabled')
result = await pose_service.estimate_poses(csi_data=csi_data) Type guard
from typing import Any, Dict, Optional, TypeGuard
import numpy as np
def is_valid_csi(csi: Optional[np.ndarray]) -> TypeGuard[np.ndarray]:
"""True when real CSI input is present and non-empty."""
return csi is not None and getattr(csi, 'size', 0) > 0
if not is_valid_csi(csi_data) and not pose_service.settings.mock_pose_data:
raise ValueError('csi_data required') Prevention
- Make CSI collection failures raise upstream so None never reaches estimate_poses().
- Require csi_data as a positional argument in production call paths (the signature already documents it as required when mock is off).
- Return 400/422 from pose endpoints when no csi_data is supplied and mock mode is disabled.
When it happens
Trigger: Calling estimate_poses() with no csi_data argument while mock_pose_data=False (production profile); an API endpoint invoking pose estimation before any hardware feed delivers CSI; hardware collection failed upstream and None was forwarded.
Common situations: Frontends/dashboards probing the pose endpoint on a box without sensors; dev machines running prod settings; upstream CSI collection errors silently passing None instead of failing fast.
Related errors
- Mock pose generation is disabled. Real pose estimation requi
- Unsupported router type: {router_type}
- Atheros CSI format parsing is not yet implemented. The Ather
- Unsupported hardware type: {self.hardware_type}
- Interface '{interface}' not listed in /proc/net/wireless. Av
AI-assisted analysis of ruvnet/RuView@4685618388 (2026-08-16).
Data as JSON: /api/errors/fda7e85fa0b96f62.
Report an issue: GitHub.