{"record":{"id":"2c873ca4ed1991a5","repo":"tensorflow/models","slug":"failed-to-obtain-a-unique-export-directory-name-af","errorCode":null,"errorMessage":"Failed to obtain a unique export directory name after {MAX_DIRECTORY_CREATION_ATTEMPTS} attempts.","messagePattern":"Failed to obtain a unique export directory name after (.+?) attempts\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"official/core/export_base.py","lineNumber":181,"sourceCode":"    RuntimeError: if repeated attempts fail to obtain a unique timestamped\n      directory name.\n  \"\"\"\n  attempts = 0\n  while attempts < MAX_DIRECTORY_CREATION_ATTEMPTS:\n    timestamp = int(time.time())\n\n    result_dir = tf.io.gfile.join(\n        tf.compat.as_bytes(export_dir_base), tf.compat.as_bytes(str(timestamp)))\n    if not tf.io.gfile.exists(result_dir):\n      # Collisions are still possible (though extremely unlikely): this\n      # directory is not actually created yet, but it will be almost\n      # instantly on return from this function.\n      return result_dir\n    time.sleep(1)\n    attempts += 1\n    logging.warning('Directory %s already exists; retrying (attempt %s/%s)',\n                    str(result_dir), attempts, MAX_DIRECTORY_CREATION_ATTEMPTS)\n  raise RuntimeError('Failed to obtain a unique export directory name after '\n                     f'{MAX_DIRECTORY_CREATION_ATTEMPTS} attempts.')\n","sourceCodeStart":163,"sourceCodeEnd":183,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/core/export_base.py#L163-L183","documentation":"Error \"Failed to obtain a unique export directory name after {MAX_DIRECTORY_CREATION_ATTEMPTS} attempts.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/core/export_base.py:181 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}