{"record":{"id":"675825b06f02314c","repo":"cocoindex-io/cocoindex","slug":"livemapfeed-sources-require-live-mode-pass-live-t","errorCode":null,"errorMessage":"LiveMapFeed sources require live mode. Pass live=True to app.update() or use a LiveMapView source that supports full scans.","messagePattern":"LiveMapFeed sources require live mode\\. Pass live=True to app\\.update\\(\\) or use a LiveMapView source that supports full scans\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"python/cocoindex/_internal/live_component.py","lineNumber":578,"sourceCode":"\nclass _MountEachLiveComponent:\n    \"\"\"Internal LiveComponent created by mount_each() for LiveMapFeed/LiveMapView items.\"\"\"\n\n    def __init__(\n        self,\n        items: LiveMapFeed[Any, Any],\n        fn: Any,\n        args: tuple[Any, ...],\n        kwargs: dict[str, Any],\n    ) -> None:\n        self._items = items\n        self._fn = fn\n        self._args = args\n        self._kwargs = kwargs\n\n    async def process(self) -> None:\n        if not isinstance(self._items, LiveMapView):\n            raise TypeError(\n                \"LiveMapFeed sources require live mode. \"\n                \"Pass live=True to app.update() or use a LiveMapView source that \"\n                \"supports full scans.\"\n            )\n        from .api import mount\n\n        async for key, value in self._items:\n            await mount(\n                ComponentSubpath(key), self._fn, value, *self._args, **self._kwargs\n            )  # type: ignore[arg-type]\n\n    async def process_live(self, operator: LiveComponentOperator) -> None:\n        subscriber: LiveMapSubscriber[Any, Any] = LiveMapSubscriber(\n            operator, self._fn, self._args, self._kwargs\n        )\n        await self._items.watch(subscriber)\n\n","sourceCodeStart":560,"sourceCodeEnd":596,"githubUrl":"https://github.com/cocoindex-io/cocoindex/blob/e84aa99b3292c5270a4b313b2a7137ad9ce8ab3b/python/cocoindex/_internal/live_component.py#L560-L596","documentation":"LiveMapFeed.process requires its items source to be a LiveMapView, i.e. the run must be in live mode. In non-live (full-update) mode the feed would not receive change streams, so it raises TypeError telling you to pass live=True to app.update() or use a source supporting full scans.","triggerScenarios":"Running app.update() without live=True while the component's main function builds a LiveMapFeed from a non-LiveMapView items value (e.g. a static list or full-scan result).","commonSituations":"Adding a live map feed to a pipeline and still invoking the default blocking update; CI/scripts calling app.update_blocking() without the live flag.","solutions":["Call await app.update(live=True) (or the live equivalent in your entry point) so sources are LiveMapViews.","Use a LiveMapView-based source that supports the mode you're running.","If a full batch update is intended, replace LiveMapFeed with a regular mount_each over a full scan."],"exampleFix":"// before\napp.update_blocking()\n// after\nawait app.update(live=True)","handlingStrategy":"validation","validationCode":"from cocoindex._internal.live_component import LiveMapView\nif not isinstance(items, LiveMapView):\n    raise TypeError(\"LiveMapFeed needs live=True or a full-scan source\")","typeGuard":"def is_live_view(x) -> bool: return isinstance(x, LiveMapView)","tryCatchPattern":"try:\n    await app.update()\nexcept TypeError as e:\n    if \"LiveMapFeed\" in str(e):\n        await app.update(live=True)","preventionTips":["Always pass live=True to app.update() when the pipeline uses LiveMapFeed.","Keep live components and full-scan updates in separate apps or code paths."],"tags":["python","live-component","mode-mismatch"],"backgroundTag":"incompatible-source-type","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"}