{"record":{"id":"ef43fc5ceb39428e","repo":"PaddlePaddle/PaddleOCR","slug":"does-not-exist-ef43fc","errorCode":null,"errorMessage":"{} does not exist!","messagePattern":"(.+?) does not exist!","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"ppocr/data/simple_dataset.py","lineNumber":417,"sourceCode":"            file_idx = self._index_map[idx]\n            data_line = self._all_lines[file_idx]\n        else:\n            file_idx = self.data_idx_order_list[idx]\n            data_line = self.data_lines[file_idx]\n        try:\n            data_line = data_line.decode(\"utf-8\")\n            substr = data_line.strip(\"\\n\").split(self.delimiter)\n            file_name = substr[0]\n            file_name = self._try_parse_filename_list(file_name)\n            label = substr[1]\n            img_path = (\n                file_name\n                if file_name.startswith(\"http://\") or file_name.startswith(\"https://\")\n                else os.path.join(self.data_dir, file_name)\n            )\n            data = {\"img_path\": img_path, \"label\": label}\n            if not _img_path_exists(img_path):\n                raise Exception(\"{} does not exist!\".format(img_path))\n            data[\"image\"] = _load_image_bytes(img_path)\n            data[\"ext_data\"] = self.get_ext_data()\n            data[\"filename\"] = data[\"img_path\"]\n            data[\"epoch\"] = self._shared_epoch.value\n            outs = transform(data, self.ops)\n        except:\n            self.logger.error(\n                \"When parsing line {}, error happened with msg: {}\".format(\n                    data_line, traceback.format_exc()\n                )\n            )\n            outs = None\n        if outs is None:\n            # during evaluation, we should fix the idx to get same results for many times of evaluation.\n            rnd_idx = (\n                np.random.randint(self.__len__())\n                if self.mode == \"train\"\n                else (idx + 1) % self.__len__()","sourceCodeStart":399,"sourceCodeEnd":435,"githubUrl":"https://github.com/PaddlePaddle/PaddleOCR/blob/2661c7c0ef5c613e8f93c6e93b2e052399f0f854/ppocr/data/simple_dataset.py#L399-L435","documentation":"The main detection/recognition SimpleDataset parses each label line, treats the first field as either an http(s) URL (used as-is) or a path joined with data_dir, and raises Exception('{path} does not exist!') when the file cannot be found (local path) before reading image bytes. The outer except logs the line and skips it (outs = None).","triggerScenarios":"Any label line whose image path does not exist on disk: wrong data_dir, images not yet downloaded, a relative path that assumes another working directory, or an http URL that only fails if the URL check is bypassed (note _img_path_exists also probes remote URLs).","commonSituations":"First run after cloning configs without downloading train_data; mixing label files written on Windows (backslashes); trailing whitespace or \\r from CRLF label files; symlinked dataset roots not present in containers; a few genuinely deleted images in a big dataset (these get skipped with log noise).","solutions":["Run the one-liner check for the first label line: python -c 'import os; p=open(label).readline().strip().split(\"\\t\")[0]; print(os.path.exists(os.path.join(data_dir, p)))'","Fix data_dir / label_file_list in the yml so the join resolves","Download the dataset images (e.g. icdar2015, lsvt) per docs and keep the documented directory layout","Clean label files: strip \\r (dos2unix), normalize backslashes, and drop lines for removed images to avoid skipped-sample logs"],"exampleFix":"# before (config)\ndata_dir: ./train_data\nlabel_file_list: ./train_data/ic15.txt\n# after\ndata_dir: ./train_data/icdar2015/text_localization\nlabel_file_list: ./train_data/icdar2015/text_localization/train_icdar2015_label.txt","handlingStrategy":"validation","validationCode":"import os\nmissing = []\nfor path in label_file_list:\n    for line in open(path, encoding='utf-8'):\n        name = line.strip('\\r\\n').split(delimiter)[0]\n        p = name if name.startswith(('http://', 'https://')) else os.path.join(data_dir, name)\n        if not p.startswith('http') and not os.path.exists(p):\n            missing.append(p)\nassert not missing, f'{len(missing)} missing images, first: {missing[:3]}'","typeGuard":null,"tryCatchPattern":"try:\n    out = dataset[idx]\nexcept Exception:\n    out = None  # upstream logs 'does not exist' and skips; track skip counts in logs","preventionTips":["Run the existence lint for every label_file_list entry before training","Keep dataset mounts at fixed absolute paths across host/container","Strip \\r and normalize backslashes when label files come from Windows"],"tags":["dataset","file-not-found","config","label-file"],"backgroundTag":null,"analyzedSha":"2661c7c0ef5c613e8f93c6e93b2e052399f0f854","analyzedAt":"2026-08-14T20:17:30.180Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}