{"record":{"id":"45948e8d846ce857","repo":"tensorflow/models","slug":"s-does-not-match-any-files-45948e","errorCode":null,"errorMessage":"%s does not match any files.","messagePattern":"(.+?) does not match any files\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/legacy/bert/run_squad_helper.py","lineNumber":384,"sourceCode":"  logging.info('Writing nbest to: %s', (output_nbest_file))\n\n  squad_lib.write_to_json_files(all_predictions, output_prediction_file)\n  squad_lib.write_to_json_files(all_nbest_json, output_nbest_file)\n  if version_2_with_negative:\n    squad_lib.write_to_json_files(scores_diff_json, output_null_log_odds_file)\n\n\ndef _get_matched_files(input_path):\n  \"\"\"Returns all files that matches the input_path.\"\"\"\n  input_patterns = input_path.strip().split(',')\n  all_matched_files = []\n  for input_pattern in input_patterns:\n    input_pattern = input_pattern.strip()\n    if not input_pattern:\n      continue\n    matched_files = tf.io.gfile.glob(input_pattern)\n    if not matched_files:\n      raise ValueError('%s does not match any files.' % input_pattern)\n    else:\n      all_matched_files.extend(matched_files)\n  return sorted(all_matched_files)\n\n\ndef predict_squad(strategy,\n                  input_meta_data,\n                  tokenizer,\n                  bert_config,\n                  squad_lib,\n                  init_checkpoint=None):\n  \"\"\"Get prediction results and evaluate them to hard drive.\"\"\"\n  if init_checkpoint is None:\n    init_checkpoint = tf.train.latest_checkpoint(FLAGS.model_dir)\n\n  all_predict_files = _get_matched_files(FLAGS.predict_file)\n  squad_model = get_squad_model_to_predict(strategy, bert_config,\n                                           init_checkpoint, input_meta_data)","sourceCodeStart":366,"sourceCodeEnd":402,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/legacy/bert/run_squad_helper.py#L366-L402","documentation":"Error \"%s does not match any files.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/legacy/bert/run_squad_helper.py:384 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"}