qdrant / qdrant-client

Python client for Qdrant vector search engine
https://qdrant.tech
Apache License 2.0
673 stars 106 forks source link

Extra inputs are not permitted #648

Closed zopidev closed 2 weeks ago

zopidev commented 2 weeks ago

I run search qdrant as in example:

results = client.search( collection_name="amazon", query_vector=query_embedding,

with_payload=False,

    limit=5,
)

But I got the error:

Traceback (most recent call last): File "/app/research-qdrant/path/to/venv/lib/python3.11/site-packages/qdrant_client/http/api_client.py", line 88, in send return parse_astype(response.json(), type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/research-qdrant/path/to/venv/lib/python3.11/site-packages/qdrant_client/http/api_client.py", line 201, in parse_as_type return model_type(obj=obj).obj ^^^^^^^^^^^^^^^^^^^ File "/app/research-qdrant/path/to/venv/lib/python3.11/site-packages/pydantic/main.py", line 176, in init self.__pydantic_validator__.validate_python(data, self_instance=self) pydantic_core._pydantic_core.ValidationError: 5 validation errors for ParsingModel[InlineResponse20014] (for parse_as_type) obj.result.0.order_value Extra inputs are not permitted [type=extra_forbidden, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.7/v/extra_forbidden obj.result.1.order_value Extra inputs are not permitted [type=extra_forbidden, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.7/v/extra_forbidden obj.result.2.order_value Extra inputs are not permitted [type=extra_forbidden, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.7/v/extra_forbidden obj.result.3.order_value Extra inputs are not permitted [type=extra_forbidden, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.7/v/extra_forbidden obj.result.4.order_value Extra inputs are not permitted [type=extra_forbidden, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.7/v/extra_forbidden

joein commented 2 weeks ago

hi @zopidev

could you please tell us the versions of qdrant and qdrant-client you're using?

zopidev commented 2 weeks ago

I installed qdrant-client 1.3.2

joein commented 2 weeks ago

qdrant-client==1.3.2 is a quite old version, and if you're not using qdrant == 1.3.x or 1.4.x, then this error might happen, because otherwise it would mean that you're using incompatible qdrant and qdrant-client versions

I would recommend you to use qdrant-client and qdrant with the same minor versions (e.g. qdrant-client 1.9.1 and qdrant 1.9.5)

zopidev commented 2 weeks ago

Thanks @joein , I upgraded qdrant-client to version 1.9.1 and it worked !!!

giacomobartoli commented 1 week ago

Same error for me. I had to upgrade from 1.7.2 to 1.9.2. Thanks for help @joein