From 087c958df12801030a333564bdd3ffc7fc7dc6c7 Mon Sep 17 00:00:00 2001 From: bigsheeper Date: Wed, 25 Oct 2023 20:55:07 +0800 Subject: [PATCH] Fix api key Signed-off-by: bigsheeper --- pymilvus/orm/connections.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pymilvus/orm/connections.py b/pymilvus/orm/connections.py index a90c778db..783ee823b 100644 --- a/pymilvus/orm/connections.py +++ b/pymilvus/orm/connections.py @@ -319,7 +319,8 @@ def with_config(config: Tuple) -> bool: uri = kwargs.get("uri") if uri is not None: server_type = get_server_type(uri) - if server_type == ZILLIZ and ":" not in token: + parsed_uri = parse.urlparse(uri) + if server_type == ZILLIZ and parsed_uri.port is None: kwargs["uri"] = uri + ":" + str(VIRTUAL_PORT) config = (