{"record":{"id":"9cb3123e0adae15d","repo":"apache/beam","slug":"enoent-not-found-s","errorCode":"ENOENT","errorMessage":"Not found: %s","messagePattern":"Not found: (.+?)","errorType":"exception","errorClass":"IOError","httpStatus":404,"severity":"error","filePath":"sdks/python/apache_beam/io/azure/blobstorageio.py","lineNumber":648,"sourceCode":"        counter,\n        time.time() - start_time)\n\n\nclass BlobStorageDownloader(Downloader):\n  def __init__(self, client, path, buffer_size):\n    self._client = client\n    self._path = path\n    self._container, self._blob = parse_azfs_path(path)\n    self._buffer_size = buffer_size\n\n    self._blob_to_download = self._client.get_blob_client(\n        self._container, self._blob)\n\n    try:\n      properties = self._get_object_properties()\n    except ResourceNotFoundError as http_error:\n      if http_error.status_code == 404:\n        raise IOError(errno.ENOENT, 'Not found: %s' % self._path)\n      else:\n        _LOGGER.error(\n            'HTTP error while requesting file %s: %s', self._path, http_error)\n        raise\n\n    self._size = properties.size\n\n  @retry.with_exponential_backoff(\n      retry_filter=retry.retry_on_beam_io_error_filter)\n  def _get_object_properties(self):\n    return self._blob_to_download.get_blob_properties()\n\n  @property\n  def size(self):\n    return self._size\n\n  def get_range(self, start, end):\n    # Download_blob first parameter is offset and second is length (exclusive).","sourceCodeStart":630,"sourceCodeEnd":666,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/io/azure/blobstorageio.py#L630-L666","documentation":"The Azure BlobStorageIO ReadBuffer (blobstorageio.py:648) fetches object properties in __init__ and, if Azure returns HTTP 404, raises a standard IOError with errno ENOENT and 'Not found: <path>'. This makes a missing blob behave like a missing local file for Beam's file-based sources.","triggerScenarios":"Creating a reader for a blob path that does not exist (e.g. empty input pattern resolved to a nonexistent file, file deleted before read, wrong container).","commonSituations":"Pipeline input path typo; upstream stage failed silently so expected output blob is missing; case-sensitivity mismatches in blob names.","solutions":["Verify the input path/blob exists (client.exists or az storage blob list) before running","Correct the container/blob name in pipeline options","Catch IOError with errno.ENOENT to handle missing inputs gracefully"],"exampleFix":"// before\nwith client.open(path, 'r') as f:\n    data = f.read()\n// after\nif not client.exists(path):\n    logging.warning('blob %s missing, using empty input', path)\n    data = b''\nelse:\n    with client.open(path, 'r') as f:\n        data = f.read()","handlingStrategy":"try-catch","validationCode":"import errno\nif not client.exists(path):\n    # avoid constructing a reader for a missing blob\n    raise SystemExit(f'input blob missing: {path}')","typeGuard":null,"tryCatchPattern":"import errno\ntry:\n    reader = client.open(path, 'r')\nexcept IOError as e:\n    if e.errno == errno.ENOENT:\n        logging.error('input blob not found: %s', path)\n    else:\n        raise","preventionTips":["Verify input paths exist before launching pipelines","Guard against deleted-in-flight inputs with exists() checks","Use match()/listing APIs instead of hard-coded single paths"],"tags":["azure","file-not-found","enoent"],"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-20T03:17:13.778Z"}