{"record":{"id":"d92e2bb1eb471db1","repo":"apache/beam","slug":"found-no-files-that-match-self-path-r","errorCode":null,"errorMessage":"Found no files that match {self.path!r}","messagePattern":"Found no files that match (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/dataframe/io.py","lineNumber":281,"sourceCode":"      raise NotImplementedError('compression')\n    if not isinstance(path, str):\n      raise frame_base.WontImplementError('non-deferred')\n    self.reader = reader\n    self.path = path\n    self.args = args\n    self.kwargs = kwargs\n    self.binary = binary\n    self.incremental = incremental\n    self.splitter = splitter\n    self.filename_column = filename_column\n\n  def expand(self, root):\n    paths_pcoll = root | beam.Create([self.path])\n    match = io.filesystems.FileSystems.match([self.path], limits=[1])[0]\n    if not match.metadata_list:\n      # TODO(https://github.com/apache/beam/issues/20858): This should be\n      # allowed for streaming pipelines if user provides an explicit schema.\n      raise FileNotFoundError(f\"Found no files that match {self.path!r}\")\n    first_path = match.metadata_list[0].path\n    with io.filesystems.FileSystems.open(first_path) as handle:\n      if not self.binary:\n        handle = TextIOWrapper(\n            handle, encoding=self.kwargs.get(\"encoding\", None))\n      if self.incremental:\n        with self.reader(handle, *self.args, **dict(self.kwargs,\n                                                    chunksize=100)) as stream:\n          sample = next(stream)\n      else:\n        sample = self.reader(handle, *self.args, **self.kwargs)\n    if self.filename_column:\n      sample[self.filename_column] = ''\n\n    matches_pcoll = paths_pcoll | fileio.MatchAll()\n    indices_pcoll = (\n        matches_pcoll.pipeline\n        | 'DoOnce' >> beam.Create([None])","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/dataframe/io.py#L263-L299","documentation":"In the deferred text/CSV file source's expand(), FileSystems.match is called on the glob path with a limit; if the match returns no metadata (no files on the filesystem match the pattern), this error naming the path fires before any read is attempted. It means the glob matched zero files — typically a wrong path, wrong bucket, or missing permissions.","triggerScenarios":"read_csv('gs://bucket/prefix/*.csv') where no objects match, a misspelled bucket/path, wrong project credentials hiding the data, or running a batch pipeline before the producing job has written files.","commonSituations":"Typos in GCS/S3 paths; environment misconfiguration (wrong project); files written with different extension than the glob; race conditions where input isn't staged yet.","solutions":["Verify the path/glob manually (gsutil ls, aws s3 ls) and correct typos.","Confirm authentication/project so the filesystem can see the objects.","Ensure upstream files exist before the pipeline runs (ordering/dependency)."],"exampleFix":"// before\nread_csv('gs://my-bucket/dat/*.csv')  # files are under dt=YYYY-MM-DD/*.csv\n// after\nread_csv('gs://my-bucket/dat/*/*.csv')","handlingStrategy":"validation","validationCode":"from apache_beam.io import filesystems\nm = filesystems.FileSystems.match([path], limits=[1])[0]\nif not m.metadata_list:\n    raise FileNotFoundError(f'No files match {path}')","typeGuard":null,"tryCatchPattern":"try:\n    df = read_csv('gs://bucket/prefix/*.csv')\nexcept FileNotFoundError:\n    logging.error('Check path, credentials, and that inputs exist before launch')\n    raise","preventionTips":["Dry-run FileSystems.match on the glob before launching the pipeline","Verify bucket paths with gsutil/aws cli","Ensure upstream jobs complete before reads (ordering)","Check project/authentication configuration"],"tags":["python","apache-beam","io","gcs"],"backgroundTag":"file-not-found","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}