Find answers from the community

Updated last year

Error

At a glance
Hi Guys, I'm running into the below just whilst trying to import things. I've updated Llamaindex to the latest version but no joy. I've had to truncate it a little bit due to the nitro restriction, but I've attached the full error messsage.Any help is much appreciated. from llama_index.retrievers import BaseRetriever File "/opt/homebrew/lib/python3.10/site-packages/llama_index/__init__.py", line 21, in <module> from llama_index.indices.common.struct_store.base import SQLDocumentContextBuilder File "/opt/homebrew/lib/python3.10/site-packages/llama_index/indices/__init__.py", line 4, in <module> from llama_index.indices.document_summary.base import DocumentSummaryIndex File "/opt/homebrew/lib/python3.10/site-packages/llama_index/indices/document_summary/__init__.py", line 4, in <module> from llama_index.indices.document_summary.base import ( File "/opt/homebrew/lib/python3.10/site-packages/llama_index/indices/document_summary/base.py", line 14, in <module> from llama_index.indices.base import BaseIndex File "/opt/homebrew/lib/python3.10/site-packages/llama_index/indices/base.py", line 6, in <module> from llama_index.chat_engine.types import BaseChatEngine, ChatMode File "/opt/homebrew/lib/python3.10/site-packages/llama_index/chat_engine/__init__.py", line 1, in <module> from llama_index.chat_engine.condense_question import CondenseQuestionChatEngine input_key: str = Field( TypeError: Argument 'description' has incorrect type (expected str, got tuple)
L
B
6 comments
Try pip install pydantic==1.10.12
Also I need to fix that line though lol but that pydantic version should work
@Logan M that worked. Thanks πŸ™‚. Any reason how you were able to troubleshoot that, I'd have been there for days
Well, I spend every day making fixes and adding new features to llamaindex πŸ˜… so I guess mostly from background knowledge

Field is a pydantic object. There's lots of compat issues between V1 and V2 -- while we technically support V2, this is a small bug I need to fix πŸ‘
Ahh, makes sense. Still, the error message doesn't give much away even if you know the codebase v well.
Yea, I've seen something similar once or twice so i spotted it pretty quickly haha
Add a reply
Sign up and join the conversation on Discord