{"record":{"id":"a771c471f0f8d4f7","repo":"HKUDS/Vibe-Trading","slug":"whatsapp-dependencies-not-installed-run-pip-inst","errorCode":null,"errorMessage":"WhatsApp dependencies not installed. Run: pip install \"vibe-trading-ai[whatsapp]\"","messagePattern":"WhatsApp dependencies not installed\\. Run: pip install \"vibe-trading-ai\\[whatsapp\\]\"","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agent/src/channels/whatsapp.py","lineNumber":74,"sourceCode":"def _default_database_path() -> Path:\n    return get_runtime_subdir(\"whatsapp-auth\") / \"neonize.db\"\n\n\ndef _legacy_bridge_config_fields(config: dict[str, Any]) -> list[str]:\n    return [field for field in _LEGACY_BRIDGE_CONFIG_FIELDS if field in config]\n\n\ndef _load_neonize() -> _NeonizeAPI:\n    global _NEONIZE_API\n    if _NEONIZE_API is not None:\n        return _NEONIZE_API\n\n    try:\n        from neonize.aioze.client import NewAClient\n        from neonize.aioze.events import ConnectedEv, DisconnectedEv, MessageEv, PairStatusEv\n        from neonize.utils.jid import build_jid\n    except ImportError as exc:\n        raise RuntimeError(\n            'WhatsApp dependencies not installed. Run: pip install \"vibe-trading-ai[whatsapp]\"'\n        ) from exc\n\n    _NEONIZE_API = _NeonizeAPI(\n        NewAClient=NewAClient,\n        ConnectedEv=ConnectedEv,\n        DisconnectedEv=DisconnectedEv,\n        MessageEv=MessageEv,\n        PairStatusEv=PairStatusEv,\n        build_jid=build_jid,\n    )\n    return _NEONIZE_API\n\n\ndef _has_field(message: Any, name: str) -> bool:\n    if message is None:\n        return False\n","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/HKUDS/Vibe-Trading/blob/80ffdda44c5c4db0dd84d70e051cca591cea67df/agent/src/channels/whatsapp.py#L56-L92","documentation":"Raised by _load_neonize when importing neonize (NewAClient, events, build_jid) fails with ImportError. The WhatsApp channel is implemented via the optional neonize package, which is not installed with the base distribution. The error tells you to install the whatsapp extra.","triggerScenarios":"Instantiating or connecting the WhatsApp channel (via _new_client, _build_jid, or _register_handlers) when neonize is not installed in the current environment.","commonSituations":"Installed the package without the [whatsapp] extra; running in a slim Docker image; virtualenv mismatch where the app runs in a different interpreter than the one with neonize installed.","solutions":["Run: pip install \"vibe-trading-ai[whatsapp]\"","Confirm you are installing into the same Python environment the app runs in (check `which python` / `pip -V`).","In Dockerfiles, add the whatsapp extra to the pip install line."],"exampleFix":"# before\npip install vibe-trading-ai\n\n# after\npip install \"vibe-trading-ai[whatsapp]\"","handlingStrategy":"validation","validationCode":"def whatsapp_deps_available() -> bool:\n    try:\n        import importlib.util\n        return importlib.util.find_spec('neonize') is not None\n    except Exception:\n        return False","typeGuard":null,"tryCatchPattern":"try:\n    channel = WhatsAppChannel(...)\nexcept RuntimeError as e:\n    if 'WhatsApp dependencies not installed' in str(e):\n        raise SystemExit('Install with: pip install \"vibe-trading-ai[whatsapp]\"')\n    raise","preventionTips":["Pin the whatsapp extra in requirements/lockfiles used in deployment","Add a startup dependency check that fails fast with a clear message","Use the same interpreter for install and run (verify with pip -V)"],"tags":["whatsapp","dependencies","import-error","optional-extra"],"backgroundTag":"missing-optional-dependency","analyzedSha":"80ffdda44c5c4db0dd84d70e051cca591cea67df","analyzedAt":"2026-08-28T12:46:38.989Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}