Git Product home page Git Product logo

Comments (7)

joein avatar joein commented on June 25, 2024 1

Great thread, thanks

Seems like the issue is related to a recent typing_extensions update

pip3 install typing_extensions==4.5.0 fixes the issue for me

from qdrant-client.

joein avatar joein commented on June 25, 2024 1

@gaurav274 we will set typing-extensions = ">=4.0.0,<4.6.0" in the upcoming release

from qdrant-client.

joein avatar joein commented on June 25, 2024

Hello @gaurav274
Could you please provide qdrant-client version and full log?

from qdrant-client.

gaurav274 avatar gaurav274 commented on June 25, 2024

Hello @gaurav274 Could you please provide qdrant-client version and full log?

Yes, @joein

Name: qdrant-client
Version: 1.1.4
Summary: Client library for the Qdrant vector search engine
Home-page: https://github.com/qdrant/qdrant-client
Author: Andrey Vasnetsov
Author-email: [email protected]
License: 
Location: /test38/lib/python3.8/site-packages
Requires: grpcio, grpcio-tools, httpx, numpy, pydantic, typing-extensions, urllib3

Logs:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[1], line 1
----> 1 import qdrant_client

File /test38/lib/python3.8/site-packages/qdrant_client/__init__.py:1
----> 1 from .qdrant_client import QdrantClient as QdrantClient

File /test38/lib/python3.8/site-packages/qdrant_client/qdrant_client.py:4
      1 from typing import Any, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Union
      3 from qdrant_client import grpc as grpc
----> 4 from qdrant_client.client_base import QdrantBase
      5 from qdrant_client.conversions import common_types as types
      6 from qdrant_client.http import ApiClient, SyncApis

File /test38/lib/python3.8/site-packages/qdrant_client/client_base.py:3
      1 from typing import Any, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Union
----> 3 from qdrant_client.conversions import common_types as types
      4 from qdrant_client.http import models
      7 class QdrantBase:

File /test38/lib/python3.8/site-packages/qdrant_client/conversions/common_types.py:13
     10 from typing import List, Union
     12 from qdrant_client import grpc as grpc
---> 13 from qdrant_client.http import models as rest
     15 Filter = Union[rest.Filter, grpc.Filter]
     16 SearchParams = Union[rest.SearchParams, grpc.SearchParams]

File /test38/lib/python3.8/site-packages/qdrant_client/http/__init__.py:4
      1 import inspect
      3 from pydantic import BaseModel
----> 4 from qdrant_client.http.api_client import (  # noqa F401
      5     ApiClient as ApiClient,
      6     AsyncApis as AsyncApis,
      7     SyncApis as SyncApis,
      8 )
      9 from qdrant_client.http.models import models as models  # noqa F401
     11 for model in inspect.getmembers(models, inspect.isclass):

File /test38/lib/python3.8/site-packages/qdrant_client/http/api_client.py:7
      5 from httpx import AsyncClient, Client, Request, Response
      6 from pydantic import ValidationError
----> 7 from qdrant_client.http.api.cluster_api import AsyncClusterApi, SyncClusterApi
      8 from qdrant_client.http.api.collections_api import AsyncCollectionsApi, SyncCollectionsApi
      9 from qdrant_client.http.api.points_api import AsyncPointsApi, SyncPointsApi

File /test38/lib/python3.8/site-packages/qdrant_client/http/api/cluster_api.py:9
      7 from pydantic.json import ENCODERS_BY_TYPE
      8 from pydantic.main import BaseModel
----> 9 from qdrant_client.http.models import *
     10 from qdrant_client.http.models import models as m
     12 SetIntStr = Set[Union[int, str]]

File /test38/lib/python3.8/site-packages/qdrant_client/http/models/__init__.py:1
----> 1 from .models import *

File /test38/lib/python3.8/site-packages/qdrant_client/http/models/models.py:63
     59     p2p: "P2pConfigTelemetry" = Field(..., description="")
     60     consensus: "ConsensusConfigTelemetry" = Field(..., description="")
---> 63 class ClusterStatusOneOf(BaseModel):
     64     status: Literal[
     65         "disabled",
     66     ] = Field(..., description="")
     69 class ClusterStatusOneOf1(BaseModel):

File /test38/lib/python3.8/site-packages/pydantic/main.py:197, in pydantic.main.ModelMetaclass.__new__()

File /test38/lib/python3.8/site-packages/pydantic/fields.py:506, in pydantic.fields.ModelField.infer()

File /test38/lib/python3.8/site-packages/pydantic/fields.py:436, in pydantic.fields.ModelField.__init__()

File /test38/lib/python3.8/site-packages/pydantic/fields.py:552, in pydantic.fields.ModelField.prepare()

File /test38/lib/python3.8/site-packages/pydantic/fields.py:668, in pydantic.fields.ModelField._type_analysis()

File /usr/local/lib/python3.8/typing.py:774, in _GenericAlias.__subclasscheck__(self, cls)
    772 if self._special:
    773     if not isinstance(cls, _GenericAlias):
--> 774         return issubclass(cls, self.__origin__)
    775     if cls._special:
    776         return issubclass(cls.__origin__, self.__origin__)

TypeError: issubclass() arg 1 must be a class```

from qdrant-client.

gaurav274 avatar gaurav274 commented on June 25, 2024

Found a related issue - langchain-ai/langchain#5113

from qdrant-client.

kenhktsui avatar kenhktsui commented on June 25, 2024

Great thread, thanks

Seems like the issue is related to a recent typing_extensions update

pip3 install typing_extensions==4.5.0 fixes the issue for me

iIt works for me too!

from qdrant-client.

generall avatar generall commented on June 25, 2024

should be fixed in 1.2.0

from qdrant-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.