{"record":{"id":"138e1599c0424180","repo":"tensorflow/models","slug":"field-name-must-be-at-least-1-got-value-r","errorCode":null,"errorMessage":"{field_name} must be at least 1, got {value!r}.","messagePattern":"(.+?) must be at least 1, got (.+?)\\.","errorType":"exception","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py","lineNumber":326,"sourceCode":"\n\ndef _require_positive_int(value: Any, field_name: str) -> int:\n  \"\"\"Validates that a value is a positive (non-zero) integer.\n\n  Args:\n      value: The value to validate.\n      field_name: Field name used in the error message.\n\n  Returns:\n      The validated integer.\n\n  Raises:\n      ConfigError: If the value is not a positive integer.\n  \"\"\"\n  if isinstance(value, bool) or not isinstance(value, int):\n    raise ConfigError(f\"{field_name} must be an integer, got {value!r}.\")\n  if value < 1:\n    raise ConfigError(f\"{field_name} must be at least 1, got {value!r}.\")\n  return int(value)\n\n\ndef _require_non_empty_string(value: Any, field_name: str) -> str:\n  \"\"\"Validates that a value is a non-empty string.\n\n  Args:\n      value: The value to validate.\n      field_name: Field name used in the error message.\n\n  Returns:\n      The validated string, unchanged.\n\n  Raises:\n      ConfigError: If the value is not a non-empty string.\n  \"\"\"\n  if not isinstance(value, str) or not value.strip():\n    raise ConfigError(f\"{field_name} must be a non-empty string.\")","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py#L308-L344","documentation":"A ConfigError from _require_positive_int: the value is an integer but less than 1 (zero and negatives rejected). It fires during load_config validation of settings that must be at least 1, such as max_cpu_workers or queue_maxsize.","triggerScenarios":"Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:326 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the value to at least 1.","Use a sensible positive count, e.g. max_cpu_workers: 8.","Check that an empty or 0 value wasn't left as a placeholder."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}