You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
The grpc library throws the following exception when attempting to connect via insecure GRPC and with an API key:
Python 3.11.3 (main, Apr 5 2023, 15:52:25) [GCC 12.2.1 20230201] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from qdrant_client import QdrantClient
>>> client = QdrantClient(host="qdrant", https=False, prefer_grpc=True, api_key="foobar")
/usr/local/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py:104: UserWarning: Api key is used with unsecure connection.
warnings.warn("Api key is used with unsecure connection.")
>>> client.get_collections()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.11/site-packages/qdrant_client/qdrant_client.py", line 1130, in get_collections
return self._client.get_collections(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py", line 1489, in get_collections
response = self.grpc_collections.List(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py", line 217, in grpc_collections
self._init_grpc_collections_client()
File "/usr/local/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py", line 159, in _init_grpc_collections_client
self._grpc_channel = get_channel(
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/qdrant_client/connection.py", line 214, in get_channel
channel = grpc.insecure_channel(f"{host}:{port}", metadata, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/grpc/__init__.py", line 1964, in insecure_channel
return _channel.Channel(target, () if options is None else options, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/grpc/_channel.py", line 1649, in __init__
_common.encode(target), _augment_options(core_options, compression),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/grpc/_channel.py", line 1605, in _augment_options
compression_option = _compression.create_channel_option(compression)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/grpc/_compression.py", line 46, in create_channel_option
int(compression)),) if compression else ()
^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'
Hello,
The grpc library throws the following exception when attempting to connect via insecure GRPC and with an API key:
Looks like the problem comes from here:
qdrant-client/qdrant_client/connection.py
Line 214 in b05a7a6
The
metadata
arg shouldn't be here, after removing it the problem was resolved.Let me know if you want me to make a PR!
The text was updated successfully, but these errors were encountered: