{"record":{"id":"0d430772c7a0854a","repo":"cocoindex-io/cocoindex","slug":"apache-iggy-is-required-to-use-the-iggy-connector-0d4307","errorCode":null,"errorMessage":"apache-iggy is required to use the Iggy connector. Please install cocoindex[iggy].","messagePattern":"apache-iggy is required to use the Iggy connector\\. Please install cocoindex\\[iggy\\]\\.","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"python/cocoindex/connectors/iggy/_target.py","lineNumber":18,"sourceCode":"\"\"\"\nIggy target for CocoIndex.\n\nThis module provides a two-level target state system for Iggy:\n1. Topic level: Lightweight container for generation tracking (user-managed stream/topic)\n2. Message level: Sends messages to the topic for upserts/deletes\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Callable, Collection, Generic, NamedTuple, Sequence\n\ntry:\n    from apache_iggy import IggyClient  # type: ignore[import-not-found]\n    from apache_iggy import SendMessage as Message  # type: ignore[import-not-found]\nexcept ImportError as e:\n    raise ImportError(\n        \"apache-iggy is required to use the Iggy connector. \"\n        \"Please install cocoindex[iggy].\"\n    ) from e\n\nimport cocoindex as coco\nfrom cocoindex._internal.context_keys import ContextKey, ContextProvider\nfrom cocoindex._internal.datatype import TypeChecker\nfrom cocoindex._internal.target_state import AsyncTargetActionSinkFn\nfrom cocoindex.connectorkits.fingerprint import fingerprint_bytes, fingerprint_str\n\n# --- Type aliases ---\n\n_MessageFingerprint = bytes\n\n# --- Internal types ---\n\n\nclass _TopicKey(NamedTuple):","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/cocoindex-io/cocoindex/blob/e84aa99b3292c5270a4b313b2a7137ad9ce8ab3b/python/cocoindex/connectors/iggy/_target.py#L1-L36","documentation":"Module-level optional-dependency check, raised at import time of the Iggy connector. The connector depends on the third-party apache-iggy package, which is deliberately not a core dependency; importing the module without it installed raises ImportError immediately rather than failing obscurely later when IggyClient is instantiated. Fix by installing the extra: pip install 'cocoindex[iggy]'.","triggerScenarios":"Importing cocoindex.connectors.iggy._target or declaring an Iggy target in an environment lacking apache-iggy.","commonSituations":"Base cocoindex install without extras; writing/serving an app that only declared targets but never the source, so the missing extra wasn't noticed until target import.","solutions":["Install the extra: pip install 'cocoindex[iggy]'","Install the package directly: pip install apache-iggy","Add cocoindex[iggy] to project dependencies"],"exampleFix":"// before\npip install cocoindex\n// after\npip install \"cocoindex[iggy]\"","handlingStrategy":"fallback","validationCode":"import importlib.util\nif importlib.util.find_spec(\"apache_iggy\") is None:\n    raise SystemExit(\"Install: pip install 'cocoindex[iggy]'\")","typeGuard":null,"tryCatchPattern":"try:\n    from cocoindex.connectors.iggy import _target  # noqa\nexcept ImportError:\n    _target = None  # disable Iggy target with setup hint","preventionTips":["Install cocoindex[iggy] in every environment using Iggy targets","Include extras in Docker images and CI","Smoke-test imports of all target connectors in CI"],"tags":["iggy","import","optional-dependency","installation"],"backgroundTag":"missing-optional-dependency","analyzedSha":"e84aa99b3292c5270a4b313b2a7137ad9ce8ab3b","analyzedAt":"2026-09-08T15:59:19.997Z","contentChangedAt":"2026-09-08T15:59:19.997Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}