{"record":{"id":"b3c9db1fc0d97743","repo":"tensorflow/models","slug":"the-name-argument-must-be-a-tuple-of-n-integer","errorCode":null,"errorMessage":"The {name} argument must be a tuple of {n} integers. Received: {value}","messagePattern":"The (.+?) argument must be a tuple of (.+?) integers\\. Received: (.+?)","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"official/vision/ops/augment.py","lineNumber":171,"sourceCode":"      ints.\n    n: The size of the tuple to be returned.\n    name: The name of the argument being validated, e.g. \"strides\" or\n      \"kernel_size\". This is only used to format error messages.\n\n  Returns:\n    A tuple of n integers.\n\n  Raises:\n    ValueError: If something else than an int/long or iterable thereof was\n      passed.\n  \"\"\"\n  if isinstance(value, int):\n    return (value,) * n\n  else:\n    try:\n      value_tuple = tuple(value)\n    except TypeError as exc:\n      raise TypeError(\n          f'The {name} argument must be a tuple of {n} integers. '\n          f'Received: {value}'\n      ) from exc\n    if len(value_tuple) != n:\n      raise ValueError(\n          f'The {name} argument must be a tuple of {n} integers. '\n          f'Received: {value}'\n      )\n    for single_value in value_tuple:\n      try:\n        int(single_value)\n      except (ValueError, TypeError) as exc:\n        raise ValueError(\n            f'The {name} argument must be a tuple of {n} integers. Received:'\n            f' {value} including element {single_value} of type'\n            f' {type(single_value)}.'\n        ) from exc\n    return value_tuple","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/vision/ops/augment.py#L153-L189","documentation":"Error \"The {name} argument must be a tuple of {n} integers. Received: {value}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/vision/ops/augment.py:171 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the argument as a tuple of exactly n integers.","Wrap scalar values into a tuple of the required length."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}