affaan-m/ECC · error · FalError
live transport requires TASTE_FORGE_ALLOW_LIVE=1
Error message
live transport requires TASTE_FORGE_ALLOW_LIVE=1
What it means
require_live() raises FalError unless the process-level environment variable TASTE_FORGE_ALLOW_LIVE is set to exactly "1". It is a deliberate safety gate called before any live network transport (api_key, submit, upload, download), ensuring the library never hits the real fal.ai API by accident. The dry-run default keeps all operations local/offline.
Solutions
- Export TASTE_FORGE_ALLOW_LIVE=1 before running the script (exact value "1", not "true")
- Set it inline: TASTE_FORGE_ALLOW_LIVE=1 python script.py
- In CI, add TASTE_FORGE_ALLOW_LIVE=1 to the job's environment/secrets configuration
- If you intended dry-run behavior, remove the live call instead — the gate is doing its job
Example fix
// before python make_video.py # FalError: live transport requires... // after TASTE_FORGE_ALLOW_LIVE=1 python make_video.py
Defensive patterns
Strategy: validation
Validate before calling
import os
assert os.environ.get("TASTE_FORGE_ALLOW_LIVE") == "1", "set TASTE_FORGE_ALLOW_LIVE=1 to enable live calls" Try / catch
try:
api.submit(...)
except FalError as e:
if "TASTE_FORGE_ALLOW_LIVE" in str(e):
print("run with: TASTE_FORGE_ALLOW_LIVE=1 <command>")
raise Prevention
- Set TASTE_FORGE_ALLOW_LIVE=1 exactly — 'true' or 'yes' will not pass the =="1" check
- Set it in CI/job env config, not ad-hoc shells, so it propagates reliably
- Keep live mode off by default in shared scripts and enable per-invocation
- Check os.environ early in your script entrypoint to fail fast with a clear message
When it happens
Trigger: Calling api_key(), submit(), upload(), or download() without TASTE_FORGE_ALLOW_LIVE=1 in the environment — including when the variable is unset, set to "true"/"yes", or set to 0.
Common situations: Running a script that worked in dry-run against the live API for the first time; setting the env var in a shell that didn't propagate (CI secrets, IDE run configs); exporting TASTE_FORGE_ALLOW_LIVE=true which fails the strict =="1" check.
Understand the failure class
Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.
Related errors
- Live node qualification requires ITO_ENABLE_SIXTYTWO_LIVE=1…
- live transport requires TASTE_FORGE_ALLOW_LIVE=1
- Announcements discussion category is required
- Choose at least one guided harness: Claude, Codex, or Kimi.
- config must be a JSON object
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/3e4be82d5a811e1d.
Report an issue: GitHub.
Appendix: source
Thrown at skills/taste-application/scripts/taste/falapi.py:182
def is_dry_run() -> bool:
"""True when ``TASTE_FORGE_DRY_RUN`` is set to a truthy value.
Read live rather than snapshotted at import so a CLI's ``--dry-run`` flag
can enable it after this module is already imported.
"""
return os.environ.get(DRY_RUN_ENV, "").strip().lower() in {"1", "true", "yes", "on"}
def enable_dry_run() -> None:
"""Turn on dry-run mode for this process (what ``--dry-run`` calls)."""
os.environ[DRY_RUN_ENV] = "1"
def require_live() -> None:
"""Require explicit process-level authorization before any live transport."""
if os.environ.get("TASTE_FORGE_ALLOW_LIVE") != "1":
raise FalError("live transport requires TASTE_FORGE_ALLOW_LIVE=1")
def safe_url(url: str) -> str:
"""Log only origin: paths, queries and userinfo can carry signed secrets."""
try:
parsed = urllib.parse.urlsplit(url)
return f"{parsed.scheme}://{parsed.hostname or '[invalid-host]'}"
except ValueError:
return "[invalid-url]"
def api_key() -> str:
"""Return ``FAL_KEY`` after live opt-in. Never logs the value."""
require_live()
key = os.environ.get("FAL_KEY", "").strip()
if not key:
raise MissingKeyError(
"FAL_KEY is not set.\n"View on GitHub (pinned to 8321021c54)