pydantic or version error #16021
Replies: 1 comment
-
Hello, @codingforwhat! I'm a bot designed to help you solve bugs, answer questions, and become a contributor. I'm here to assist you while you wait for a human maintainer. Yes, the pydantic validation error in Additionally, there have been similar issues reported:
To resolve the issue, you can try ensuring that you are using the correct versions of the dependencies. For example, one solution for a similar issue was to change the versions of the following packages: llama-index-embeddings-azure-openai==0.1.11
llama-index-embeddings-openai==0.1.11 You can check your versions using Additionally, make sure you have the required environment variable |
Beta Was this translation helpful? Give feedback.
-
The llamaindex was running normally, but in the past few days, pydantic has been throwing errors.
For example:
Traceback (most recent call last):
File "/home/PycharmProjects/sql_embedding9.14/main.py", line 39, in <module>
dashscope_llm = DashScope(model_name=DashScopeGenerationModels.QWEN_TURBO,max_tokens=512)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anaconda3/envs/torch/lib/python3.12/site-packages/llama_index/llms/dashscope/base.py", line 171, in init
super().init(
File "/home/lingyi/anaconda3/envs/torch/lib/python3.12/site-packages/pydantic/main.py", line 209, in init
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for DashScope
api_key
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.9/v/string_type
Is it a version issue?"
Beta Was this translation helpful? Give feedback.
All reactions