showlab / VLog

Transform Video as a Document with ChatGPT, CLIP, BLIP2, GRIT, Whisper, LangChain.
MIT License
528 stars 26 forks source link

TypeError: cannot pickle '_thread.RLock' object #9

Open achun321 opened 4 months ago

achun321 commented 4 months ago

In gpt_model.py, the LlmReasoner() class tries to save the vector store by dumping it into a tmp file as so on lines 78-79: with open(pkl_path, "wb") as f: pickle.dump(vectorstore, f)

However, this leads to TypeError: cannot pickle '_thread.RLock' object. It seems that others have experienced this problem with newer versions of Langchain beyond version 0.0.350 but even downgrading to 0.0.0350 leads to import errors. Has anyone else encountered this / been able to solve this?