{"record":{"id":"92512f653aab2c5d","repo":"deepfakes/faceswap","slug":"not-all-locations-in-the-input-list-exist","errorCode":null,"errorMessage":"Not all locations in the input list exist","messagePattern":"Not all locations in the input list exist","errorType":"exception","errorClass":"FaceswapError","httpStatus":null,"severity":"error","filePath":"lib/image.py","lineNumber":798,"sourceCode":"\n    @property\n    def location(self):\n        \"\"\" str: The folder or video that was passed in as the :attr:`path` parameter. \"\"\"\n        return self._location\n\n    def _check_location_exists(self):\n        \"\"\" Check whether the input location exists.\n\n        Raises\n        ------\n        FaceswapError\n            If the given location does not exist\n        \"\"\"\n        if isinstance(self.location, str) and not os.path.exists(self.location):\n            raise FaceswapError(f\"The location '{self.location}' does not exist\")\n        if isinstance(self.location, (list, tuple)) and not all(os.path.exists(location)\n                                                                for location in self.location):\n            raise FaceswapError(\"Not all locations in the input list exist\")\n\n    def _set_thread(self):\n        \"\"\" Set the background thread for the load and save iterators and launch it. \"\"\"\n        logger.trace(\"[%s] Setting thread\", self._name)  # type:ignore[attr-defined]\n        if self._thread is not None and self._thread.is_alive():\n            logger.trace(\"[%s] Thread pre-exists and is alive: %s\",  # type:ignore[attr-defined]\n                         self._name, self._thread)\n            return\n        self._thread = FSThread(self._process,\n                                name=self.__class__.__name__,\n                                args=(self._queue, ))\n        self._error_state = self._thread.error_state\n        logger.debug(\"[%s] Set thread: %s\", self._name, self._thread)\n        self._thread.start()\n\n    def _process(self, queue):\n        \"\"\" Image IO process to be run in a thread. Override for loader/saver process.\n","sourceCodeStart":780,"sourceCodeEnd":816,"githubUrl":"https://github.com/deepfakes/faceswap/blob/f530cb7508ae670f6474f8a7d9c4df94705cf96b/lib/image.py#L780-L816","documentation":"FaceswapError raised when ImagesIO receives a list/tuple of input locations and at least one of them does not exist. Unlike the single-path error it does not name the missing entry, so you must diff the list against the filesystem yourself.","triggerScenarios":"Passing multiple folders/videos to ImagesLoader (e.g. several extraction sources) where one entry is misspelled, unmounted, or deleted.","commonSituations":"Merging datasets from several directories where one was renamed; shell glob expansion that matched nothing; mixed mount points where one share dropped.","solutions":["Diff the list against disk to find the missing entry: [p for p in paths if not os.path.exists(p)].","Fix or remove the missing path and retry.","Use absolute paths and verify mounts before multi-location runs."],"exampleFix":"import os\n\n# before\nloader = ImagesLoader(['/data/a', '/data/b'])  # FaceswapError, which one?\n\n# after\nmissing = [p for p in ['/data/a', '/data/b'] if not os.path.exists(p)]\nassert not missing, f'missing locations: {missing}'\nloader = ImagesLoader(['/data/a', '/data/b'])","handlingStrategy":"validation","validationCode":"import os\n\nmissing = [p for p in locations if not os.path.exists(p)]\nif missing:\n    raise SystemExit(f'these input locations are missing: {missing}')","typeGuard":null,"tryCatchPattern":"try:\n    loader = ImagesLoader(locations)\nexcept FaceswapError as err:\n    if 'Not all locations' in str(err):\n        locations = [p for p in locations if os.path.exists(p)]\n        loader = ImagesLoader(locations)\n    else:\n        raise","preventionTips":["Filter list inputs through os.path.exists before constructing loaders.","Report missing entries to the user yourself — faceswap does not list them.","Re-validate multi-path configs after dataset reorganization."],"tags":["filesystem","path","validation","batch"],"backgroundTag":null,"analyzedSha":"f530cb7508ae670f6474f8a7d9c4df94705cf96b","analyzedAt":"2026-08-15T02:59:26.626Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}