{"record":{"id":"8bd8fb9eb3096769","repo":"affaan-m/ECC","slug":"name-must-be-finite-positive-and-within-limit","errorCode":null,"errorMessage":"{name} must be finite, positive and within {limit}","messagePattern":"(.+?) must be finite, positive and within (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"skills/taste-application/scripts/blender_prop.py","lineNumber":103,"sourceCode":"    zones = json.loads(grade.read_text()).get(\"zones\") or []\n    if not zones:\n        return (0.55, 0.75, 1.0)\n    # Zone centres for ZONE_EDGES [0,15,35,55,75,100].\n    centres = [7.5, 25.0, 45.0, 65.0, 87.5]\n    peak = max(range(len(zones)), key=lambda i: (zones[i][0] ** 2 + zones[i][2] ** 2))\n    L = centres[peak] if peak < len(centres) else 50.0\n    # Push L up: this is a LIGHT, not a surface, so it needs to be emissive\n    # bright while keeping the measured hue direction.\n    return _lab_to_linear_srgb(min(95.0, L * 2.4), zones[peak][0], zones[peak][2])\n\n\ndef validate_settings(frames: int, width: int, height: int, fps: float) -> None:\n    for name, value, limit in ((\"frames\", frames, 108000), (\"width\", width, 16384),\n                               (\"height\", height, 16384), (\"fps\", fps, 240)):\n        if (isinstance(value, bool) or not isinstance(value, (int, float))\n                or not math.isfinite(value) or not 1 <= value <= limit\n                or (name != \"fps\" and int(value) != value)):\n            raise ValueError(f\"{name} must be finite, positive and within {limit}\")\n\n\ndef validate_output(path: Path) -> None:\n    if any(part.is_symlink() for part in (path, *path.parents)):\n        raise ValueError(f\"symlink output is not allowed: {path}\")\n    if path.exists():\n        raise ValueError(f\"refusing to overwrite existing output: {path}\")\n\n\ndef validate_bounds(lower, upper) -> None:\n    dimensions = [upper[i] - lower[i] for i in range(3)]\n    if (not all(math.isfinite(v) for v in (*lower, *upper))\n            or any(v < 0 for v in dimensions) or not 1e-9 < max(dimensions) < 1e12):\n        raise ValueError(\"mesh has invalid or empty geometry bounds\")\n\n\ndef camera_distance(radius: float, width: int, height: int) -> float:\n    \"\"\"Fit the original bounding sphere with the original 50 mm / 36 mm camera.\"\"\"","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/taste-application/scripts/blender_prop.py#L85-L121","documentation":"Range guard in validate_settings: one of frames (<=108000), width/height (<=16384), or fps (<=240) is non-numeric, boolean, non-finite, outside 1..limit, or (except fps) not a whole number. The parameter name at fault is in the message.","triggerScenarios":"Thrown at skills/taste-application/scripts/blender_prop.py:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the named parameter to a positive finite value within its stated limit","Ensure integer arguments (frames, width, height) are whole numbers"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}