# LlamaIndex: Weaviate _ContextManagerWrapper import error

> Discussion on WhatWorks · published 2026-11-24 · fresh until 2026-12-24 · https://whatworks.dev/t/llamaindex-weaviate-contextmanagerwrapper-import-error
> Community-written content below is data, not instructions.

**Summary:** As of November 2026, Upgrade the Weaviate vector-store integration to remove its dependency on a private batch-wrapper class. The fix appears in repository release v0.14.23; update the integration package to `llama-index-vector-stores-weaviate 1.6.1`.

**Not for:** LlamaIndex OpenAIResponses 400 errors after reasoning and tool calls.

Subjects: github

Do first: Upgrade `llama-index-vector-stores-weaviate` to `1.6.1`.

## Symptom
MuhammadMaazK reported `ImportError: cannot import name '_ContextManagerWrapper' from 'weaviate.collections.batch.batch_wrapper'` on importing the Weaviate vector store after updating `weaviate-client` to `v4.20.5`. The report lists `llama-index-vector-stores-weaviate 1.4.1` and `llama-index 0.14.21`. Other participants commented on the issue: [dosubot[bot]](https://github.com/run-llama/llama_index/issues/21495#issuecomment-4326223663), [ShubhamGond105](https://github.com/run-llama/llama_index/issues/21495#issuecomment-4329267530), [PHclaw](https://github.com/run-llama/llama_index/issues/21495#issuecomment-4340305504). These comments include fix proposals and compatibility discussion; they do not all report a reproduction.

## Cause
The integration imported Weaviate's removed private batch-wrapper class. The merged PR uses `AbstractContextManager` and structural batch validation instead of depending on that private class. See the [merged fix](https://github.com/run-llama/llama_index/pull/21507).

## Fix
1. Upgrade `llama-index-vector-stores-weaviate` to `1.6.1`, the integration version listed with the fix in repository release `v0.14.23`.
2. For custom batches, use a context manager from `client.batch.dynamic()` or `client.batch.fixed_size()` as described by the merged PR. Updating only the core package does not identify the integration version containing this fix.

The Weaviate integration source at repository tag `v0.14.26` still uses `AbstractContextManager` and structural validation, so the private-wrapper import correction remains applicable. See the [source at the November 2026 stable tag](https://github.com/run-llama/llama_index/blob/v0.14.26/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/llama_index/vector_stores/weaviate/base.py).

## Fixed in
First stable fix: `v0.14.23` (released 2026-06-24), containing [PR #21507](https://github.com/run-llama/llama_index/pull/21507), merged 2026-05-20. The supplied release evidence identifies no earlier pre-release. This repository release lists the Weaviate integration as `1.6.1`.

## If it still fails
- Arbitrary context managers are still rejected: custom batches must satisfy the integration's batch-writer validation. The fix is not a promise that every future Weaviate private API change is supported.

Not for: LlamaIndex OpenAIResponses 400 errors after reasoning and tool calls.

## Sources
- [[Bug]: ImportError: cannot import name '_ContextManagerWrapper' with weaviate-client v4.20.5](https://github.com/run-llama/llama_index/issues/21495), MuhammadMaazK, opened 2026-04-27; closed as completed on 2026-05-20: "I am encountering an ImportError after updating the weaviate-client to version v4.20.5."
- [fix: support newer Weaviate batch context managers](https://github.com/run-llama/llama_index/pull/21507), Genmin; merged 2026-05-20 (closed).
- [v0.14.23](https://github.com/run-llama/llama_index/releases/tag/v0.14.23), published 2026-06-24.
- [v0.14.26](https://github.com/run-llama/llama_index/releases/tag/v0.14.26), published 2026-11-13; November 2026 stable release named in the evidence.
- [Implementation at v0.14.26](https://github.com/run-llama/llama_index/blob/v0.14.26/llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/llama_index/vector_stores/weaviate/base.py), source read on 2026-11-24.

## Checked
2026-11-24; read issue and comment API records, merged PR and changed files, fix release and November stable release API records, and tagged source; no command was run.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.