{"record":{"id":"f5a45f046fcff464","repo":"affaan-m/ECC","slug":"the-fal-client-package-is-required-for-live-calls-pip-f5a45f","errorCode":null,"errorMessage":"the 'fal_client' package is required for live calls: pip install fal-client","messagePattern":"the 'fal_client' package is required for live calls: pip install fal-client","errorType":"exception","errorClass":"FalError","httpStatus":null,"severity":"error","filePath":"skills/taste-distillation/scripts/taste/falapi.py","lineNumber":214,"sourceCode":"    require_live()\n    key = os.environ.get(\"FAL_KEY\", \"\").strip()\n    if not key:\n        raise MissingKeyError(\n            \"FAL_KEY is not set.\\n\"\n            \"  Get a key at https://fal.ai/dashboard/keys, then either:\\n\"\n            \"    export FAL_KEY='...'\\n\"\n            \"  or run the pipeline offline with no key and no spend:\\n\"\n            f\"    export {DRY_RUN_ENV}=1      (or pass --dry-run)\"\n        )\n    return key\n\n\ndef _fal():\n    \"\"\"Import ``fal_client`` lazily so dry runs work even if it is absent.\"\"\"\n    try:\n        import fal_client  # noqa: PLC0415 - deliberate lazy import\n    except ImportError as exc:  # pragma: no cover - environment dependent\n        raise FalError(\n            \"the 'fal_client' package is required for live calls: pip install fal-client\"\n        ) from exc\n    return fal_client\n\n\n# ---------------------------------------------------------------------------\n# core: submit\n# ---------------------------------------------------------------------------\n\n\ndef _is_transient(exc: BaseException) -> bool:\n    status = getattr(exc, \"status_code\", None)\n    if status is None:\n        status = getattr(getattr(exc, \"response\", None), \"status_code\", None)\n    if isinstance(status, int):\n        return status in _TRANSIENT_STATUS\n    name = type(exc).__name__.lower()\n    if \"timeout\" in name or \"connection\" in name:","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/taste-distillation/scripts/taste/falapi.py#L196-L232","documentation":"FalError raised by the lazy _fal() importer when the 'fal_client' package is not installed. falapi.py imports fal_client only at call time so dry runs work without it, but any live submit() or upload() needs the real package. The error is chained from the original ImportError.","triggerScenarios":"Any live call path that reaches _fal() — submit() or upload() with dry-run disabled — in an environment where `import fal_client` raises ImportError.","commonSituations":"Ran the project without its optional live dependencies; installed into a different venv/interpreter than the one running the pipeline; fresh machine after cloning.","solutions":["Run: pip install fal-client","If using a project venv, activate it (or use `python -m pip install fal-client`) so the package lands in the running interpreter","Add fal-client to the project's requirements/dependency file so future installs include it","Use --dry-run / DRY_RUN_ENV=1 if you only need offline validation"],"exampleFix":"// before\nModuleNotFoundError: No module named 'fal_client'\n// after\n$ pip install fal-client","handlingStrategy":"fallback","validationCode":"import importlib.util\nif importlib.util.find_spec(\"fal_client\") is None:\n    raise SystemExit(\"fal_client missing: pip install fal-client\")","typeGuard":null,"tryCatchPattern":"try:\n    url = falapi.submit(endpoint, payload)\nexcept falapi.FalError as e:\n    if \"fal_client\" in str(e):\n        print(\"Install the live dependency: pip install fal-client\")","preventionTips":["Add fal-client to requirements.txt / pyproject dependencies","Verify with `pip show fal-client` in the same venv that runs the pipeline","Use `python -m pip install fal-client` to guarantee the right interpreter","Run offline dry-runs first; install live deps only when going live"],"tags":["python","missing-dependency","pip"],"backgroundTag":"missing-dependency","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}