{"record":{"id":"a6a6914bae4fcf80","repo":"freqtrade/freqtrade","slug":"no-pairs-file-found-with-path-pairs-file","errorCode":null,"errorMessage":"No pairs file found with path \"{pairs_file}\".","messagePattern":"No pairs file found with path \"(.+?)\"\\.","errorType":"exception","errorClass":"OperationalException","httpStatus":null,"severity":"error","filePath":"freqtrade/configuration/configuration.py","lineNumber":535,"sourceCode":"        \"\"\"\n        Helper for download script.\n        Takes first found:\n        * -p (pairs argument)\n        * --pairs-file\n        * whitelist from config\n        \"\"\"\n\n        if \"pairs\" in config:\n            config[\"exchange\"][\"pair_whitelist\"] = config[\"pairs\"]\n            return\n\n        if self.args.get(\"pairs_file\"):\n            pairs_file = Path(self.args[\"pairs_file\"])\n            logger.info(f'Reading pairs file \"{pairs_file}\".')\n            # Download pairs from the pairs file if no config is specified\n            # or if pairs file is specified explicitly\n            if not pairs_file.exists():\n                raise OperationalException(f'No pairs file found with path \"{pairs_file}\".')\n            config[\"pairs\"] = load_file(pairs_file)\n            if isinstance(config[\"pairs\"], list):\n                config[\"pairs\"].sort()\n            return\n\n        if self.args.get(\"config\"):\n            logger.info(\"Using pairlist from configuration.\")\n            config[\"pairs\"] = config.get(\"exchange\", {}).get(\"pair_whitelist\")\n        else:\n            # Fall back to /dl_path/pairs.json\n            pairs_file = config[\"datadir\"] / \"pairs.json\"\n            if pairs_file.exists():\n                logger.info(f'Reading pairs file \"{pairs_file}\".')\n                config[\"pairs\"] = load_file(pairs_file)\n                if \"pairs\" in config and isinstance(config[\"pairs\"], list):\n                    config[\"pairs\"].sort()\n","sourceCodeStart":517,"sourceCodeEnd":552,"githubUrl":"https://github.com/freqtrade/freqtrade/blob/1c8edfe4d1e8d11bd4b40e8fc3237c26c3a60e15/freqtrade/configuration/configuration.py#L517-L552","documentation":"Raised by `Configuration.prepare_trading_command`/pair loading logic when `--pairs-file` points to a path that does not exist on disk. The pairs file is a JSON list of pairs used e.g. by `freqtrade download-data` and `test-pairlist`.","triggerScenarios":"Running a subcommand with `--pairs-file /path/pairs.json` (or the deprecated arg) where the file is missing; the check is `pairs_file.exists()` before `load_file(pairs_file)`.","commonSituations":"Typo in the pairs-file path, relative path resolved against the wrong working directory, or the file was never created / was deleted after a git clean.","solutions":["Verify the path with `ls` and fix the typo or use an absolute path","Create the file as a JSON array, e.g. `[\"BTC/USDT\", \"ETH/USDT\"]`","Alternatively drop `--pairs-file` and let freqtrade read `exchange.pair_whitelist` from the config"],"exampleFix":"# before\nfreqtrade download-data --pairs-file pairs.json\n# (file missing / wrong cwd)\n\n# after\necho '[\"BTC/USDT\", \"ETH/USDT\"]' > pairs.json\nfreqtrade download-data --pairs-file ./pairs.json","handlingStrategy":"validation","validationCode":"from pathlib import Path\np = Path(args['pairs_file'])\nif not p.is_file():\n    raise SystemExit(f'pairs file missing: {p}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use absolute paths for --pairs-file","Keep pairs.json inside the repo/user_data and check it into version control","Validate required input files at script startup before invoking freqtrade"],"tags":["config","filesystem","pairs","cli"],"backgroundTag":null,"analyzedSha":"1c8edfe4d1e8d11bd4b40e8fc3237c26c3a60e15","analyzedAt":"2026-08-15T05:09:08.096Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}