{"record":{"id":"d395506750e0a916","repo":"bytedance/deer-flow","slug":"the-buzz-channel-requires-the-buzz-extra-run-u","errorCode":null,"errorMessage":"The Buzz channel requires the 'buzz' extra: run `uv sync --extra buzz` (installs coincurve for BIP-340 signing).","messagePattern":"The Buzz channel requires the 'buzz' extra: run `uv sync --extra buzz` \\(installs coincurve for BIP-340 signing\\)\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"backend/app/channels/buzz_nostr.py","lineNumber":24,"sourceCode":"\"\"\"\n\nfrom __future__ import annotations\n\nimport hashlib\nimport json\nfrom dataclasses import dataclass\nfrom typing import Any\n\n_BECH32_CHARSET = \"qpzry9x8gf2tvdw0s3jn54khce6mua7l\"\n\nCOINCURVE_INSTALL_HINT = \"The Buzz channel requires the 'buzz' extra: run `uv sync --extra buzz` (installs coincurve for BIP-340 signing).\"\n\n\ndef _require_coincurve():\n    try:\n        import coincurve\n    except ImportError as exc:  # pragma: no cover - exercised via BuzzChannel.start\n        raise RuntimeError(COINCURVE_INSTALL_HINT) from exc\n    return coincurve\n\n\n@dataclass(frozen=True)\nclass NostrKeys:\n    secret: bytes\n    pubkey_hex: str\n\n\ndef _bech32_polymod(values: list[int]) -> int:\n    gen = [0x3B6A57B2, 0x26508E6D, 0x1EA119FA, 0x3D4233DD, 0x2A1462B3]\n    chk = 1\n    for v in values:\n        b = chk >> 25\n        chk = (chk & 0x1FFFFFF) << 5 ^ v\n        for i in range(5):\n            chk ^= gen[i] if ((b >> i) & 1) else 0\n    return chk","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/backend/app/channels/buzz_nostr.py#L6-L42","documentation":"buzz_nostr keeps the coincurve import lazy so the rest of DeerFlow works without it; _require_coincurve() is called only when BIP-340 signing/parsing is actually needed (BuzzChannel.start -> parse_private_key etc.). If `import coincurve` raises ImportError, it raises this RuntimeError with the exact install command, because coincurve is an optional dependency gated behind the 'buzz' extra.","triggerScenarios":"channels.buzz is enabled in config.yaml but the backend environment was synced without the buzz extra (plain `uv sync`), or the deployment image was built without `--extra buzz`. The error surfaces when the Buzz channel starts and first tries to derive keys.","commonSituations":"Enabling Buzz on an existing installation that predates it; a Docker/CI image built from a bare requirements install; switching virtualenvs and forgetting the extra; pip-installed coincurve failing to build on exotic platforms.","solutions":["Run `uv sync --extra buzz` in backend/ (installs coincurve), then restart the Gateway.","For Docker deployments, rebuild with a target/profile that includes the buzz extra.","If you did not mean to use Buzz, set channels.buzz.enabled to false or remove the block.","If coincurve fails to compile, ensure a C toolchain and libsecp256k1 headers are available, or use a prebuilt wheel for your platform."],"exampleFix":"# before\nuv sync\n\n# after\nuv sync --extra buzz","handlingStrategy":"try-catch","validationCode":"def buzz_extra_available() -> bool:\n    try:\n        import coincurve  # noqa: F401\n        return True\n    except ImportError:\n        return False\n\nif config.buzz_enabled and not buzz_extra_available():\n    logger.error('enable channels.buzz only after `uv sync --extra buzz`')","typeGuard":null,"tryCatchPattern":"try:\n    channel.start()\nexcept RuntimeError as e:\n    if 'buzz' extra' in str(e):\n        logger.error('%s — disabling buzz channel', e)\n    else:\n        raise","preventionTips":["Document `uv sync --extra buzz` wherever buzz is enabled in config.","Build deployment images with the buzz extra when the feature is planned.","Fail config validation at startup if buzz is enabled without coincurve importable, so it never fails lazily at first message."],"tags":["buzz","dependencies","nostr","python"],"backgroundTag":null,"analyzedSha":"1dd6ba1acb03700589994b0366c5d1c7d05e2eff","analyzedAt":"2026-08-14T21:20:34.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}