# AttributeError: 'LangchainEmbedding' object has no attribute '\_langchain\_embedding;

**URL:** <https://discuss.huggingface.co/t/attributeerror-langchainembedding-object-has-no-attribute-langchain-embedding/93396>\
**Category:** Intermediate\
**Created:** [June 21, 2024, 5:32pm UTC](https://discuss.huggingface.co/t/attributeerror-langchainembedding-object-has-no-attribute-langchain-embedding/93396 "2024-06-21T17:32:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishaljoshi24](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vishaljoshi24](https://discuss.huggingface.co/u/vishaljoshi24)\
**Post date:** [June 21, 2024, 5:32pm UTC](https://discuss.huggingface.co/t/attributeerror-langchainembedding-object-has-no-attribute-langchain-embedding/93396/1 "2024-06-21T17:32:34Z")

</div>

Hi! So I’ve been having a persistent type of error for the last two weeks. Basically I have a RAG based LLM query engine which uses a dataset of Dungeons and Dragons PDFs to answer questions about character classes and game rules.

I’m currently trying to speed it up and one thing I am trying to do is store the VectorStoreIndex in a pickle file which will then be called when I run the LLM query engine rather than generating the VectorStoreIndex everytime. However when I try to do this I run into one of two errors: either 'AttributeError: HuggingFaceEmbedding has no attribute ‘\_model’ OR 'AttributeError: LangchainEmbedding object has no attribute ‘\_langchain\_embedding’. I’ve linked the repository where this code is so you can take a look at it for yourself: [https://github.com/vishaljoshi24/oracle](https://github.com/vishaljoshi24/oracle). Please look at test.py as that is what is leading to the second of the errors I’ve highlighted here.
