# KeyError: 'moduleConfig' Error Message

**URL:** https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035
**Category:** Support
**Created:** [October 12, 2024, 8:10pm UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035 "2024-10-12T20:10:45Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![kihumban](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kihumban/32/2525_2.png) [@kihumban](https://forum.weaviate.io/u/kihumban)
#### Post date: [October 12, 2024, 8:10pm UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/1 "2024-10-12T20:10:45Z")

</div>

I am getting **KeyError: ‘moduleConfig’** error message when using weaviate with langchain. Weaviate is running in a docker container.

This is the code generating the error.

client = weaviate.connect\_to\_local()  
embeddings = OpenAIEmbeddings()  
db2 = WeaviateVectorStore.from\_documents(docs\_3, embeddings, client=client)

Here is my docker-compose.yml

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/weaviate/original/2X/d/d0010e9038224c2f7cc7876f6c7ec659c6a664c0.png)

[This post on langchain github](https://github.com/langchain-ai/langchain-weaviate/issues/177) on the same issue recommended removing the DEFAULT\_VECTORIZER\_MODULE: ‘multi2vec-clip’ from the docker compose file. I did that, restarted the container but I am still getting the error.

Any suggestions?

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [October 15, 2024, 9:32pm UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/2 "2024-10-15T21:32:46Z")

</div>

hi @kihumban !!

Welcome to our community 🤗

We have a nice recipe for langchain here, that I crafted myself, check it out:

> **[recipes/integrations/llm-frameworks/langchain/loading-data at main ·...](https://github.com/weaviate/recipes/tree/main/integrations/llm-frameworks/langchain/loading-data)**
>
> This repository shares end-to-end notebooks on how to use various Weaviate features and integrations! - weaviate/recipes

If you could share here the sull running example as well as the docker compose in text, I can try reproducing that.

The recipe I liked above has all you need to use all Langchain features with Weaviate.

Let me know if I can help you on that 🙂

Thanks!

---

<div class="post-metadata">

### Author: ![kihumban](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kihumban/32/2525_2.png) [@kihumban](https://forum.weaviate.io/u/kihumban)
#### Post date: [October 15, 2024, 11:09pm UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/3 "2024-10-15T23:09:51Z")

</div>

@DudaNogueira thank you for sharing the recipe. I will check it out. This forum does not allow me to attach any file other than images. It flag text for having more than 2 hyperlinks. What is the best way of sharing the code and the docker file?

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [October 15, 2024, 11:10pm UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/4 "2024-10-15T23:10:39Z")

</div>

You can paste the docker and code here too 🙂

---

<div class="post-metadata">

### Author: ![kihumban](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kihumban/32/2525_2.png) [@kihumban](https://forum.weaviate.io/u/kihumban)
#### Post date: [October 16, 2024, 1:55am UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/5 "2024-10-16T01:55:14Z")

</div>

I am basically working on this [Langchain Weaviate library example](https://python.langchain.com/docs/integrations/vectorstores/weaviate/). Here is the code. The last expression is the one generating the error.  
############  
from langchain\_community.document\_loaders import TextLoader  
from langchain\_openai import OpenAIEmbeddings  
from langchain\_text\_splitters import CharacterTextSplitter  
import weaviate  
from langchain\_weaviate.vectorstores import WeaviateVectorStore  
from langchain.chains import RetrievalQAWithSourcesChain  
from langchain\_openai import OpenAI

loader = TextLoader(“data/state\_of\_the\_union.txt”)  
documents = loader.load()  
text\_splitter = CharacterTextSplitter(chunk\_size=1000, chunk\_overlap=0)  
docs\_3 = text\_splitter.split\_documents(documents)  
embeddings = OpenAIEmbeddings()

client = weaviate.connect\_to\_local()  
db2 = WeaviateVectorStore.from\_documents(docs\_3, embeddings, client=client)  
##############

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/weaviate/original/2X/8/8317c7df02ea41e80c7d84496cd4d97596cfc2f0.png)

######################  
Initially I had the DEFAULT\_VECTORIZER\_MODULE set to ‘multi2vec-clip’. However I removed it based to advise on this thread. Apparently the issue is being cause by the conflict between declaring embeddings = OpenAIEmbeddings() while DEFAULT\_VECTORIZER\_MODULE set to ‘multi2vec-clip’. However, updating my docker file by setting DEFAULT\_VECTORIZER\_MODULE to ‘none’ did not resolve the issue.

---

<div class="post-metadata">

### Author: ![kihumban](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kihumban/32/2525_2.png) [@kihumban](https://forum.weaviate.io/u/kihumban)
#### Post date: [October 16, 2024, 1:56am UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/6 "2024-10-16T01:56:31Z")

</div>

Here is the LangChain thread regarding the error

> <https://github.com/langchain-ai/langchain-weaviate/issues/177>
>
> \*\*Describe the bug\*\*
> 
> I am encountering an error where \`moduleConfig\` is not p…resent in the schema when running \`WeaviateVectorStore.from\_documents()\`. 
> \`\`\`
> Traceback (most recent call last):
> File "/opt/homebrew/Cellar/python@3.12/3.12.2\_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/runpy.py", line 198, in \_run\_module\_as\_main
> return \_run\_code(code, main\_globals, None,
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/opt/homebrew/Cellar/python@3.12/3.12.2\_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/runpy.py", line 88, in \_run\_code
> exec(code, run\_globals)
> File "/Users/xxx/.vscode/extensions/ms-python.debugpy-2024.6.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/\_\_main\_\_.py", line 39, in \<module\>
> cli.main()
> File "/Users/xxx/.vscode/extensions/ms-python.debugpy-2024.6.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
> run()
> File "/Users/xxx/.vscode/extensions/ms-python.debugpy-2024.6.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run\_file
> runpy.run\_path(target, run\_name="\_\_main\_\_")
> File "/Users/xxx/.vscode/extensions/ms-python.debugpy-2024.6.0-darwin-arm64/bundled/libs/debugpy/\_vendored/pydevd/\_pydevd\_bundle/pydevd\_runpy.py", line 321, in run\_path
> return \_run\_module\_code(code, init\_globals, run\_name,
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/Users/xxx/.vscode/extensions/ms-python.debugpy-2024.6.0-darwin-arm64/bundled/libs/debugpy/\_vendored/pydevd/\_pydevd\_bundle/pydevd\_runpy.py", line 135, in \_run\_module\_code
> \_run\_code(code, mod\_globals, init\_globals,
> File "/Users/xxx/.vscode/extensions/ms-python.debugpy-2024.6.0-darwin-arm64/bundled/libs/debugpy/\_vendored/pydevd/\_pydevd\_bundle/pydevd\_runpy.py", line 124, in \_run\_code
> exec(code, run\_globals)
> File "/Users/xxx/Desktop/projects/xxx/backend/app/core/test.py", line 22, in \<module\>
> db = WeaviateVectorStore.from\_documents(docs, embeddings, client=weaviate\_client)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/Users/xxx/Library/Caches/pypoetry/virtualenvs/app-w4MTL1IK-py3.12/lib/python3.12/site-packages/langchain\_core/vectorstores.py", line 550, in from\_documents
> return cls.from\_texts(texts, embedding, metadatas=metadatas, \*\*kwargs)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/Users/xxx/Library/Caches/pypoetry/virtualenvs/app-w4MTL1IK-py3.12/lib/python3.12/site-packages/langchain\_weaviate/vectorstores.py", line 477, in from\_texts
> weaviate\_vector\_store = cls(
> ^^^^
> File "/Users/xxx/Library/Caches/pypoetry/virtualenvs/app-w4MTL1IK-py3.12/lib/python3.12/site-packages/langchain\_weaviate/vectorstores.py", line 129, in \_\_init\_\_
> self.\_multi\_tenancy\_enabled = self.\_collection.config.get(
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/Users/xxx/Library/Caches/pypoetry/virtualenvs/app-w4MTL1IK-py3.12/lib/python3.12/site-packages/weaviate/collections/config.py", line 81, in get
> return \_collection\_config\_from\_json(schema)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/Users/xxx/Library/Caches/pypoetry/virtualenvs/app-w4MTL1IK-py3.12/lib/python3.12/site-packages/weaviate/collections/classes/config\_methods.py", line 246, in \_collection\_config\_from\_json
> vectorizer\_config=\_\_get\_vectorizer\_config(schema),
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/Users/xxx/Library/Caches/pypoetry/virtualenvs/app-w4MTL1IK-py3.12/lib/python3.12/site-packages/weaviate/collections/classes/config\_methods.py", line 78, in \_\_get\_vectorizer\_config
> vec\_config: Dict\[str, Any\] = schema\["moduleConfig"\].pop(schema\["vectorizer"\])
> ~~~~~~ ^^^^^^^^^^^^^^^^
> KeyError: 'moduleConfig'
> \`\`\`
>  
> \*\*Complete Minimal Reproducible Example\*\*
> 
> docker-compose.yml
> \`\`\`
> \---
> version: '3.4'
> services:
> weaviate:
> command:
> - --host
> - 0.0.0.0
> - --port
> - '8080'
> - --scheme
> - http
> image: cr.weaviate.io/semitechnologies/weaviate:1.24.10
> ports:
> - 8080:8080
> - 50051:50051
> volumes:
> - weaviate\_data:/var/lib/weaviate
> restart: on-failure:0
> environment:
> CLIP\_INFERENCE\_API: 'http://multi2vec-clip:8080'
> RERANKER\_INFERENCE\_API: 'http://reranker-transformers:8080'
> QUERY\_DEFAULTS\_LIMIT: 25
> AUTHENTICATION\_ANONYMOUS\_ACCESS\_ENABLED: 'true'
> PERSISTENCE\_DATA\_PATH: '/var/lib/weaviate'
> DEFAULT\_VECTORIZER\_MODULE: 'multi2vec-clip'
> ENABLE\_MODULES: 'multi2vec-clip,reranker-transformers'
> CLUSTER\_HOSTNAME: 'node1'
> multi2vec-clip:
> image: cr.weaviate.io/semitechnologies/multi2vec-clip:sentence-transformers-clip-ViT-B-32-multilingual-v1
> environment:
> ENABLE\_CUDA: '0'
> reranker-transformers:
> image: cr.weaviate.io/semitechnologies/reranker-transformers:cross-encoder-ms-marco-MiniLM-L-6-v2
> environment:
> ENABLE\_CUDA: '0'
> volumes:
> weaviate\_data:
> ...
> \`\`\`
> 
> I received the error when running the following code:
> \`\`\`py
> from langchain.text\_splitter import CharacterTextSplitter
> from langchain\_community.document\_loaders import TextLoader
> from langchain\_openai import OpenAIEmbeddings
> import weaviate
> from langchain\_weaviate.vectorstores import WeaviateVectorStore
> 
> OPENAI\_API\_KEY='xxxx'
> 
> loader = TextLoader("state\_of\_the\_union.txt")
> documents = loader.load()
> text\_splitter = CharacterTextSplitter(chunk\_size=1000, chunk\_overlap=0)
> docs = text\_splitter.split\_documents(documents)
> 
> embeddings = OpenAIEmbeddings(api\_key=OPENAI\_API\_KEY)
> weaviate\_client = weaviate.connect\_to\_local(port=8080)
> db = WeaviateVectorStore.from\_documents(docs, embeddings, client=weaviate\_client) # error occured here
> \`\`\`
> 
> 
> \*\*Expected behavior\*\*
> I should be able to create my Weaviate vector store without issues
> 
> \*\*Tech Stack (please complete the following information):\*\*
> \- weaviate server version: 1.24.10
> \- weaviate modules enabled: 'multi2vec-clip,reranker-transformers'
> \- langchain-weaviate version: 0.0.1.post1
> \- langchain version: 0.1.17
> 
> \*\*Additional context\*\*
> No issues when using weaviate library directly, so probably an issue with how langchain-weaviate creates the initial schema.

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [October 16, 2024, 2:24am UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/7 "2024-10-16T02:24:58Z")

</div>

Can you remove the `DEFAULT_VECTORIZER_MODULE` altogether?

Also, can you copy the docker compose here? Otherwise it’s really copy and paste from the image, as it gets all messed up 😬

Have you looked into the recipe I pasted?

It should give you all the steps to start using Langchain with Weaviate the proper way.

Thanks!

---

<div class="post-metadata">

### Author: ![kihumban](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kihumban/32/2525_2.png) [@kihumban](https://forum.weaviate.io/u/kihumban)
#### Post date: [October 17, 2024, 2:20am UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/8 "2024-10-17T02:20:20Z")

</div>

I removed the DEFAULT\_VECTORIZER\_MODULE and I am still getting the same error. However, I have worked through the the code in the recipe you shared and that is working ok. The only difference is that the recipe is using Embedded Weaviate rather than stand-alone server as was in my code. I am not sure if that has an impact. I will modify the recipe to try with client = weaviate.connect\_to\_local().

The forum platform does not allow me to copy the docker compose file. Every time I do that it flags the post with the following message.

 ![Screenshot 2024-10-16 at 10.17.30 PM](https://canada1.discourse-cdn.com/flex027/uploads/weaviate/original/2X/8/8ca6b97f3dc35f6609545537e8ef340a8aee12f4.png)

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [October 17, 2024, 5:40pm UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/9 "2024-10-17T17:40:10Z")

</div>

Hi!

As long as you have a working weaviate client (connect to embedded/local/cloud) it should work accordingly.

You can paste the the docker compose here, like so:

```yaml
---
services:
  weaviate:
    command:
    - --host
    - 0.0.0.0
    - --port
    - '8080'
    - --scheme
    - http
    image: cr.weaviate.io/semitechnologies/weaviate:1.27.0
    ports:
    - 8080:8080
    - 50051:50051
    volumes:
    - weaviate_data:/var/lib/weaviate
    restart: on-failure:0
    environment:
      QUERY_DEFAULTS_LIMIT: 25
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
      PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
      DEFAULT_VECTORIZER_MODULE: 'none'
      ENABLE_API_BASED_MODULES: 'true'
      CLUSTER_HOSTNAME: 'node1'
volumes:
  weaviate_data:
...

```

---

<div class="post-metadata">

### Author: ![kihumban](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kihumban/32/2525_2.png) [@kihumban](https://forum.weaviate.io/u/kihumban)
#### Post date: [October 17, 2024, 6:42pm UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/10 "2024-10-17T18:42:01Z")

</div>

I have tried pasting the docker compose here but it does not work. I keep getting the error message I indicated above.

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [October 17, 2024, 7:06pm UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/11 "2024-10-17T19:06:37Z")

</div>

Oh, I mean, the content of the docker compose file.

Feel free to reach out to me on our slack. I would love to help you there too!

---

<div class="post-metadata">

### Author: ![kihumban](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kihumban/32/2525_2.png) [@kihumban](https://forum.weaviate.io/u/kihumban)
#### Post date: [October 18, 2024, 1:40am UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/12 "2024-10-18T01:40:02Z")

</div>

I run the [langchain-simple-pdf-multitenant.ipynb](https://github.com/weaviate/recipes/blob/main/integrations/llm-frameworks/langchain/loading-data/langchain-simple-pdf-multitenant.ipynb) recipe using local stand-alone server instead of embedded and run into the same error. The only section of the code that changed was the initialization of the client

client = weaviate.connect\_to\_local(  
headers={  
“X-OpenAi-Api-Key”: os.environ.get(“OPENAI\_API\_KEY”), # Replace with your Cohere key  
}  
)

Here is my docker compose:

```auto
services:
  weaviate:
    command:
    - --host
    - 0.0.0.0
    - --port
    - '8080'
    - --scheme
    - http
    image: cr.weaviate.io/semitechnologies/weaviate:1.26.4
    ports:
    - 8080:8080
    - 50051:50051
    volumes:
    - weaviate_data:/var/lib/weaviate
    restart: on-failure:0
    environment:
      CLIP_INFERENCE_API: 'http://multi2vec-clip:8080'
      QUERY_DEFAULTS_LIMIT: 25
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
      PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
      ENABLE_API_BASED_MODULES: 'true'
      ENABLE_MODULES: 'multi2vec-clip,text2vec-openai,generative-openai'
      CLUSTER_HOSTNAME: 'node1'
  multi2vec-clip:
    image: cr.weaviate.io/semitechnologies/multi2vec-clip:sentence-transformers-clip-ViT-B-32-multilingual-v1
    environment:
      ENABLE_CUDA: '0'
volumes:
  weaviate_data:
...

```

---

<div class="post-metadata">

### Author: ![kihumban](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kihumban/32/2525_2.png) [@kihumban](https://forum.weaviate.io/u/kihumban)
#### Post date: [October 18, 2024, 1:55am UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/13 "2024-10-18T01:55:46Z")

</div>

Here is the expression and the associated error dump:

db = WeaviateVectorStore.from\_documents(docs, embeddings, client=client, index\_name=“WikipediaLangChainMT”, tenant=“brazil”)

```auto
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In[11], line 1
----> 1 db = WeaviateVectorStore.from_documents(docs, embeddings, client=client, index_name="WikipediaLangChainMT", tenant="brazil")

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/langchain_core/vectorstores/base.py:835, in VectorStore.from_documents(cls, documents, embedding, **kwargs)
    833 texts = [d.page_content for d in documents]
    834 metadatas = [d.metadata for d in documents]
--> 835 return cls.from_texts(texts, embedding, metadatas=metadatas, **kwargs)

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/langchain_weaviate/vectorstores.py:487, in WeaviateVectorStore.from_texts(cls, texts, embedding, metadatas, tenant, client, index_name, text_key, relevance_score_fn, **kwargs)
    475 attributes = list(metadatas[0].keys()) if metadatas else None
    477 weaviate_vector_store = cls(
    478 client,
    479 index_name,
   (...)
    484 use_multi_tenancy=tenant is not None,
    485 )
--> 487 weaviate_vector_store.add_texts(texts, metadatas, tenant=tenant, **kwargs)
    489 return weaviate_vector_store

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/langchain_weaviate/vectorstores.py:167, in WeaviateVectorStore.add_texts(self, texts, metadatas, tenant, **kwargs)
    164 if self._embedding:
    165 embeddings = self._embedding.embed_documents(list(texts))
--> 167 with self._client.batch.dynamic() as batch:
    168 for i, text in enumerate(texts):
    169 data_properties = {self._text_key: text}

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/weaviate/collections/batch/client.py:179, in _BatchClientWrapper.dynamic(self, consistency_level)
    177 self._batch_mode: _BatchMode = _DynamicBatching()
    178 self._consistency_level = consistency_level
--> 179 return self.__create_batch_and_reset()

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/weaviate/collections/batch/client.py:135, in _BatchClientWrapper.__create_batch_and_reset(self)
    133 def __create_batch_and_reset(self) -> _ContextManagerWrapper[_BatchClient]:
    134 if self._vectorizer_batching is None or not self._vectorizer_batching:
--> 135 configs = self.__config.list_all(simple=True)
    137 vectorizer_batching = False
    138 for config in configs.values():

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/weaviate/collections/collections/sync.py:286, in _Collections.list_all(self, simple)
    265 def list_all(
    266 self, simple: bool = True
    267 ) -> Union[Dict[str, CollectionConfig], Dict[str, CollectionConfigSimple]]:
    268 """List the configurations of the all the collections currently in the Weaviate instance.
    269 
    270 Arguments:
   (...)
    284 If Weaviate reports a non-OK status.
    285 """
--> 286 return self.__loop.run_until_complete(self.__collections.list_all, simple)

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/weaviate/event_loop.py:40, in _EventLoop.run_until_complete(self, f, *args, **kwargs)
     38 raise WeaviateClosedClientError()
     39 fut = asyncio.run_coroutine_threadsafe(f(*args, **kwargs), self.loop)
---> 40 return fut.result()

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py:456, in Future.result(self, timeout)
    454 raise CancelledError()
    455 elif self._state == FINISHED:
--> 456 return self.__get_result()
    457 else:
    458 raise TimeoutError()

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py:401, in Future.__get_result(self)
    399 if self._exception:
    400 try:
--> 401 raise self._exception
    402 finally:
    403 # Break a reference cycle with the exception in self._exception
    404 self = None

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/weaviate/collections/collections/async_.py:304, in _CollectionsAsync.list_all(self, simple)
    285 """List the configurations of the all the collections currently in the Weaviate instance.
    286 
    287 Arguments:
   (...)
    301 If Weaviate reports a non-OK status.
    302 """
    303 _validate_input([_ValidateArgument(expected=[bool], name="simple", value=simple)])
--> 304 return await self._get_all(simple=simple)

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/weaviate/collections/collections/base.py:76, in _CollectionsBase._get_all(self, simple)
     74 assert res is not None
     75 if simple:
---> 76 return _collection_configs_simple_from_json(res)
     77 return _collection_configs_from_json(res)

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/weaviate/collections/classes/config_methods.py:327, in _collection_configs_simple_from_json(schema)
    323 def _collection_configs_simple_from_json(
    324 schema: Dict[str, Any]
    325 ) -> Dict[str, _CollectionConfigSimple]:
    326 return {
--> 327 schema["class"]: _collection_config_simple_from_json(schema) for schema in schema["classes"]
    328 }

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/weaviate/collections/classes/config_methods.py:250, in _collection_config_simple_from_json(schema)
    242 def _collection_config_simple_from_json(schema: Dict[str, Any]) -> _CollectionConfigSimple:
    243 return _CollectionConfigSimple(
    244 name=schema["class"],
    245 description=schema.get("description"),
    246 generative_config=__get_generative_config(schema),
    247 properties=_properties_from_config(schema) if schema.get("properties") is not None else [],
    248 references=_references_from_config(schema) if schema.get("properties") is not None else [],
    249 reranker_config=__get_rerank_config(schema),
--> 250 vectorizer_config=__get_vectorizer_config(schema),
    251 vectorizer=__get_vectorizer(schema),
    252 vector_config=__get_vector_config(schema, simple=True),
    253 )

File /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/weaviate/collections/classes/config_methods.py:88, in __get_vectorizer_config(schema)
     86 def __get_vectorizer_config(schema: Dict[str, Any]) -> Optional[_VectorizerConfig]:
     87 if __is_vectorizer_present(schema) is not None and schema.get("vectorizer", "none") != "none":
---> 88 vec_config: Dict[str, Any] = schema["moduleConfig"].pop(schema["vectorizer"])
     89 try:
     90 vectorizer = Vectorizers(schema["vectorizer"])

KeyError: 'moduleConfig'

```

---

<div class="post-metadata">

### Author: ![kihumban](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kihumban/32/2525_2.png) [@kihumban](https://forum.weaviate.io/u/kihumban)
#### Post date: [October 21, 2024, 1:48am UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/14 "2024-10-21T01:48:02Z")

</div>

Is this some kind of a bug? It seem it’s looking for a property called “moduleConfig” in the collection object. But when I look at the collection object configuration (below), there is no property “moduleConfig”

```auto
<weaviate.Collection config={
  "name": "WikipediaLangChainMT",
  "description": null,
  "generative_config": {
    "generative": "generative-openai",
    "model": {}
  },
  "inverted_index_config": {
    "bm25": {
      "b": 0.75,
      "k1": 1.2
    },
    "cleanup_interval_seconds": 60,
    "index_null_state": false,
    "index_property_length": false,
    "index_timestamps": false,
    "stopwords": {
      "preset": "en",
      "additions": null,
      "removals": null
    }
  },
  "multi_tenancy_config": {
    "enabled": true,
    "auto_tenant_creation": true,
    "auto_tenant_activation": true
  },
  "properties": [],
  "references": [],
  "replication_config": {
    "factor": 1,
    "async_enabled": false
  },
  "reranker_config": null,
  "sharding_config": null,
  "vector_index_config": {
    "quantizer": null,
    "cleanup_interval_seconds": 300,
    "distance_metric": "cosine",
    "dynamic_ef_min": 100,
    "dynamic_ef_max": 500,
    "dynamic_ef_factor": 8,
    "ef": -1,
    "ef_construction": 128,
    "flat_search_cutoff": 40000,
    "max_connections": 32,
    "skip": false,
    "vector_cache_max_objects": 1000000000000
  },
  "vector_index_type": "hnsw",
  "vectorizer_config": {
    "vectorizer": "text2vec-openai",
    "model": {
      "baseURL": "https://api.openai.com",
      "model": "ada"
    },
    "vectorize_collection_name": true
  },
  "vectorizer": "text2vec-openai",
  "vector_config": null
}>

```

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [October 21, 2024, 9:30pm UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/15 "2024-10-21T21:30:37Z")

</div>

Hi!

This example in our recipes uses `text2vec-openai` and `generative-openai`

And those modules are enabled:

`ENABLE_MODULES: 'multi2vec-clip,text2vec-openai,generative-openai'`

So it should work. 🤔

have you restarted your docker so the changes take effect?

you can call:

```bash
docker compose up -d

```

---

<div class="post-metadata">

### Author: ![kihumban](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kihumban/32/2525_2.png) [@kihumban](https://forum.weaviate.io/u/kihumban)
#### Post date: [October 21, 2024, 10:12pm UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/16 "2024-10-21T22:12:46Z")

</div>

I have all those modules enabled in my docker compose as previously indicated. I have restarted the docker several times, the outcome has been consistently the same - KeyError: ‘moduleConfig’.

Below is my docker compose at it currently is. I just run the program and got the same error.

```auto
services:
  weaviate:
    command:
    - --host
    - 0.0.0.0
    - --port
    - '8080'
    - --scheme
    - http
    image: cr.weaviate.io/semitechnologies/weaviate:1.26.4
    ports:
    - 8080:8080
    - 50051:50051
    volumes:
    - weaviate_data:/var/lib/weaviate
    restart: on-failure:0
    environment:
      CLIP_INFERENCE_API: 'http://multi2vec-clip:8080'
      QUERY_DEFAULTS_LIMIT: 25
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
      PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
      ENABLE_MODULES: 'multi2vec-clip,text2vec-openai,generative-openai'
      ENABLE_API_BASED_MODULES: 'true'
      CLUSTER_HOSTNAME: 'node1'
  multi2vec-clip:
    image: cr.weaviate.io/semitechnologies/multi2vec-clip:sentence-transformers-clip-ViT-B-32-multilingual-v1
    environment:
      ENABLE_CUDA: '0'
volumes:
  weaviate_data:
...

```

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [October 21, 2024, 10:23pm UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/17 "2024-10-21T22:23:52Z")

</div>

Hi! This is strange.

I have used your docker compose, and was able to run this:

```auto

client.collections.delete("Kihu")
collection = client.collections.create(
    "Kihu",
    vectorizer_config=wvc.config.Configure.Vectorizer.text2vec_openai(),
    generative_config=wvc.config.Configure.Generative.openai(),
)
collection.data.insert({"text": "This is a test"})
obj = collection.generate.fetch_objects(single_prompt="translate {text} to spanish", include_vector=True).objects[0]
print("Generation", obj.generated)
print("Generation", obj.vector)

```

Let me know if you can run this code.

Thanks!

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [October 21, 2024, 10:24pm UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/18 "2024-10-21T22:24:43Z")

</div>

Also, you can check what are the installed modules in a server with:

```python
client.get_meta().get("modules")

```

---

<div class="post-metadata">

### Author: ![kihumban](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kihumban/32/2525_2.png) [@kihumban](https://forum.weaviate.io/u/kihumban)
#### Post date: [October 22, 2024, 12:31am UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/19 "2024-10-22T00:31:02Z")

</div>

> [@DudaNogueira](#):
>
> `client.get_meta().get("modules")`

the modules are there. See below.

```auto
{'generative-anthropic': {'documentationHref': 'https://docs.anthropic.com/en/api/getting-started',
  'name': 'Generative Search - Anthropic'},
 'generative-anyscale': {'documentationHref': 'https://docs.anyscale.com/endpoints/overview',
  'name': 'Generative Search - Anyscale'},
 'generative-aws': {'documentationHref': 'https://docs.aws.amazon.com/bedrock/latest/APIReference/welcome.html',
  'name': 'Generative Search - AWS'},
 'generative-cohere': {'documentationHref': 'https://docs.cohere.com/reference/chat',
  'name': 'Generative Search - Cohere'},
 'generative-databricks': {'documentationHref': 'https://docs.databricks.com/en/machine-learning/foundation-models/api-reference.html#completion-task',
  'name': 'Generative Search - Databricks'},
 'generative-friendliai': {'documentationHref': 'https://docs.friendli.ai/openapi/create-chat-completions',
  'name': 'Generative Search - FriendliAI'},
 'generative-mistral': {'documentationHref': 'https://docs.mistral.ai/api/',
  'name': 'Generative Search - Mistral'},
 'generative-octoai': {'documentationHref': 'https://octo.ai/docs/text-gen-solution/getting-started',
  'name': 'Generative Search - OctoAI'},
 'generative-openai': {'documentationHref': 'https://platform.openai.com/docs/api-reference/completions',
  'name': 'Generative Search - OpenAI'},
 'generative-palm': {'documentationHref': 'https://cloud.google.com/vertex-ai/docs/generative-ai/chat/test-chat-prompts',
  'name': 'Generative Search - Google PaLM'},
 'multi2vec-palm': {'documentationHref': 'https://cloud.google.com/vertex-ai/generative-ai/docs/embeddings/get-multimodal-embeddings',
  'name': 'Google PaLM Multimodal Module'},
 'reranker-cohere': {'documentationHref': 'https://txt.cohere.com/rerank/',
  'name': 'Reranker - Cohere'},
 'reranker-voyageai': {'documentationHref': 'https://docs.voyageai.com/reference/reranker-api',
  'name': 'Reranker - VoyageAI'},
 'text2vec-aws': {'documentationHref': 'https://docs.aws.amazon.com/bedrock/latest/userguide/titan-embedding-models.html',
  'name': 'AWS Module'},
 'text2vec-cohere': {'documentationHref': 'https://docs.cohere.ai/embedding-wiki/',
  'name': 'Cohere Module'},
 'text2vec-databricks': {'documentationHref': 'https://docs.databricks.com/en/machine-learning/foundation-models/api-reference.html#embedding-task',
  'name': 'Databricks Foundation Models Module - Embeddings'},
 'text2vec-huggingface': {'documentationHref': 'https://huggingface.co/docs/api-inference/detailed_parameters#feature-extraction-task',
  'name': 'Hugging Face Module'},
 'text2vec-jinaai': {'documentationHref': 'https://jina.ai/embeddings/',
  'name': 'JinaAI Module'},
 'text2vec-octoai': {'documentationHref': 'https://octo.ai/docs/text-gen-solution/getting-started',
  'name': 'OctoAI Module'},
 'text2vec-openai': {'documentationHref': 'https://platform.openai.com/docs/guides/embeddings/what-are-embeddings',
  'name': 'OpenAI Module'},
 'text2vec-palm': {'documentationHref': 'https://cloud.google.com/vertex-ai/docs/generative-ai/embeddings/get-text-embeddings',
  'name': 'Google PaLM Module'},
 'text2vec-voyageai': {'documentationHref': 'https://docs.voyageai.com/docs/embeddings',
  'name': 'VoyageAI Module'}}

```

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [October 22, 2024, 1:30pm UTC](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035/20 "2024-10-22T13:30:41Z")

</div>

were you able to run that code?

[Next page](https://forum.weaviate.io/t/keyerror-moduleconfig-error-message/5035.md?page=2)
