Closed richzw closed 1 month ago
The issue you're experiencing with MilvusVectorStore
failing to connect to a non-localhost URI when enable_sparse
is set to True
seems to be related to how the URI is being handled or possibly network accessibility. Here are some targeted steps to troubleshoot and potentially resolve the issue:
Verify the URI Format: Ensure the URI is correctly formatted as "http://address:port" or "https://address:port". For a remote connection, it should directly point to the Milvus server's IP and port, e.g., "http://192.168.1.100:19530".
Check Network Accessibility: Confirm that the Milvus server is accessible from your machine. This includes checking firewall settings and network ACLs to ensure there are no blocks in place.
Review Milvus Server Logs: If the connection issue persists, the Milvus server logs can provide insights into why the connection might be failing.
Update pymilvus Client: Compatibility between the pymilvus
client and the Milvus server is crucial. Ensure your client version is compatible with the server version you're trying to connect to.
Explicit Connection Parameters: For secured Milvus instances, make sure to include any necessary connection parameters like server_pem_path
for TLS connections.
If these steps do not resolve the issue, consider isolating the problem by testing the connection with a minimal pymilvus
client script outside of the MilvusVectorStore
context. This can help determine if the issue lies with the network/Milvus setup or the MilvusVectorStore
initialization process.
Additionally, it's important to note that the enable_sparse
option and its handling in MilvusVectorStore
might have specific requirements or known issues, especially regarding the sparse_embedding_function
and compatibility with certain Milvus server versions. Ensure that your Milvus server version supports the features you're trying to use, particularly for hybrid retrieval functionalities that require Milvus 2.4.0 or later.
To continue the conversation, mention @dosu.
i have this problem on localhost. Version: 0.10.38 i just do:
vector_store = MilvusVectorStore(uri="http://localhost:19530", dim=1024, token="root:Milvus",enable_sparse=True)
with enable_sparse=False
it works
llama-index Version: 0.10.38 llama-index-vector-stores-milvus Version: 0.1.14 pymilvus Version: 2.4.3
traceback:
---------------------------------------------------------------------------
_InactiveRpcError Traceback (most recent call last)
[... skipping hidden 1 frame]
Cell In[12], [line 1](vscode-notebook-cell:?execution_count=12&line=1)
----> [1](vscode-notebook-cell:?execution_count=12&line=1) vector_store = MilvusVectorStore(uri="http://localhost:19530/", dim=1024, token="root:Milvus",enable_sparse=True)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:269, in MilvusVectorStore.__init__(self, uri, token, collection_name, dim, embedding_field, doc_id_field, similarity_metric, consistency_level, overwrite, text_key, output_fields, index_config, search_config, batch_size, enable_sparse, sparse_embedding_function, hybrid_ranker, hybrid_ranker_params, **kwargs)
[268](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:268) host, port = extract_host_port(uri)
--> [269](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:269) connections.connect("default", host=host, port=port)
[270](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:270) self._collection = Collection(collection_name)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:447, in Connections.connect(self, alias, user, password, db_name, token, **kwargs)
[445](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:445) kwargs["secure"] = True
--> [447](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:447) connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
[448](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:448) return
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:398, in Connections.connect.<locals>.connect_milvus(**kwargs)
[396](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:396) timeout = t if isinstance(t, (int, float)) else Config.MILVUS_CONN_TIMEOUT
--> [398](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:398) gh._wait_for_channel_ready(timeout=timeout)
[399](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:399) if kwargs.get("keep_alive", False):
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:155, in GrpcHandler._wait_for_channel_ready(self, timeout)
[154](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:154) except Exception as e:
--> [155](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:155) raise e from e
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:148, in GrpcHandler._wait_for_channel_ready(self, timeout)
[147](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:147) grpc.channel_ready_future(self._channel).result(timeout=timeout)
--> [148](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:148) self._setup_identifier_interceptor(self._user, timeout=timeout)
[149](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:149) except grpc.FutureTimeoutError as e:
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:266, in GrpcHandler._setup_identifier_interceptor(self, user, timeout)
[265](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:265) host = socket.gethostname()
--> [266](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:266) self._identifier = self.__internal_register(user, host, timeout=timeout)
[267](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:267) self._identifier_interceptor = interceptor.header_adder_interceptor(
[268](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:268) ["identifier"], [str(self._identifier)]
[269](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:269) )
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:161, in error_handler.<locals>.wrapper.<locals>.handler(*args, **kwargs)
[157](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:157) LOGGER.error(
[158](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:158) f"grpc RpcError: [{inner_name}], <{e.__class__.__name__}: "
[159](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:159) f"{e.code()}, {e.details()}>, <Time:{record_dict}>"
[160](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:160) )
--> [161](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:161) raise e from e
[162](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:162) except Exception as e:
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:143, in error_handler.<locals>.wrapper.<locals>.handler(*args, **kwargs)
[142](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:142) record_dict["RPC start"] = str(datetime.datetime.now())
--> [143](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:143) return func(*args, **kwargs)
[144](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:144) except MilvusException as e:
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:182, in tracing_request.<locals>.wrapper.<locals>.handler(self, *args, **kwargs)
[181](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:181) self.set_onetime_request_id(req_id)
--> [182](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:182) return func(self, *args, **kwargs)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:91, in retry_on_rpc_failure.<locals>.wrapper.<locals>.handler(*args, **kwargs)
[90](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:90) if e.code() in IGNORE_RETRY_CODES:
---> [91](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:91) raise e from e
[92](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:92) if timeout(start_time):
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:87, in retry_on_rpc_failure.<locals>.wrapper.<locals>.handler(*args, **kwargs)
[86](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:86) try:
---> [87](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:87) return func(*args, **kwargs)
[88](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:88) except grpc.RpcError as e:
[89](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:89) # Do not retry on these codes
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:220, in upgrade_reminder.<locals>.handler(*args, **kwargs)
[219](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:219) raise MilvusException(message=msg) from e
--> [220](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:220) raise e from e
[221](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:221) except Exception as e:
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:212, in upgrade_reminder.<locals>.handler(*args, **kwargs)
[211](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:211) try:
--> [212](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:212) return func(*args, **kwargs)
[213](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:213) except grpc.RpcError as e:
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1965, in GrpcHandler.__internal_register(self, user, host, **kwargs)
[1964](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1964) req = Prepare.register_request(user, host)
-> [1965](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1965) response = self._stub.Connect(request=req)
[1966](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1966) check_status(response.status)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:277, in _UnaryUnaryMultiCallable.__call__(self, request, timeout, metadata, credentials, wait_for_ready, compression)
[268](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:268) def __call__(
[269](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:269) self,
[270](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:270) request: Any,
(...)
[275](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:275) compression: Optional[grpc.Compression] = None,
[276](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:276) ) -> Any:
--> [277](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:277) response, ignored_call = self._with_call(
[278](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:278) request,
[279](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:279) timeout=timeout,
[280](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:280) metadata=metadata,
[281](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:281) credentials=credentials,
[282](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:282) wait_for_ready=wait_for_ready,
[283](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:283) compression=compression,
[284](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:284) )
[285](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:285) return response
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:332, in _UnaryUnaryMultiCallable._with_call(self, request, timeout, metadata, credentials, wait_for_ready, compression)
[329](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:329) call = self._interceptor.intercept_unary_unary(
[330](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:330) continuation, client_call_details, request
[331](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:331) )
--> [332](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:332) return call.result(), call
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:437, in _InactiveRpcError.result(self, timeout)
[436](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:436) """See grpc.Future.result."""
--> [437](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:437) raise self
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:315, in _UnaryUnaryMultiCallable._with_call.<locals>.continuation(new_details, request)
[314](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:314) try:
--> [315](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:315) response, call = self._thunk(new_method).with_call(
[316](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:316) request,
[317](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:317) timeout=new_timeout,
[318](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:318) metadata=new_metadata,
[319](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:319) credentials=new_credentials,
[320](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:320) wait_for_ready=new_wait_for_ready,
[321](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:321) compression=new_compression,
[322](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:322) )
[323](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:323) return _UnaryOutcome(response, call)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1177, in _UnaryUnaryMultiCallable.with_call(self, request, timeout, metadata, credentials, wait_for_ready, compression)
[1171](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1171) (
[1172](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1172) state,
[1173](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1173) call,
[1174](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1174) ) = self._blocking(
[1175](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1175) request, timeout, metadata, credentials, wait_for_ready, compression
[1176](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1176) )
-> [1177](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1177) return _end_unary_response_blocking(state, call, True, None)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1003, in _end_unary_response_blocking(state, call, with_call, deadline)
[1002](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1002) else:
-> [1003](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1003) raise _InactiveRpcError(state)
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAUTHENTICATED
details = "missing authorization in header"
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-05-27T15:41:38.647605945+02:00", grpc_status:16, grpc_message:"missing authorization in header"}"
>
The above exception was the direct cause of the following exception:
_InactiveRpcError Traceback (most recent call last)
[... skipping hidden 1 frame]
Cell In[12], [line 1](vscode-notebook-cell:?execution_count=12&line=1)
----> [1](vscode-notebook-cell:?execution_count=12&line=1) vector_store = MilvusVectorStore(uri="http://localhost:19530/", dim=1024, token="root:Milvus",enable_sparse=True)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:269, in MilvusVectorStore.__init__(self, uri, token, collection_name, dim, embedding_field, doc_id_field, similarity_metric, consistency_level, overwrite, text_key, output_fields, index_config, search_config, batch_size, enable_sparse, sparse_embedding_function, hybrid_ranker, hybrid_ranker_params, **kwargs)
[268](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:268) host, port = extract_host_port(uri)
--> [269](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:269) connections.connect("default", host=host, port=port)
[270](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:270) self._collection = Collection(collection_name)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:447, in Connections.connect(self, alias, user, password, db_name, token, **kwargs)
[445](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:445) kwargs["secure"] = True
--> [447](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:447) connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
[448](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:448) return
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:398, in Connections.connect.<locals>.connect_milvus(**kwargs)
[396](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:396) timeout = t if isinstance(t, (int, float)) else Config.MILVUS_CONN_TIMEOUT
--> [398](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:398) gh._wait_for_channel_ready(timeout=timeout)
[399](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:399) if kwargs.get("keep_alive", False):
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:155, in GrpcHandler._wait_for_channel_ready(self, timeout)
[154](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:154) except Exception as e:
--> [155](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:155) raise e from e
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:148, in GrpcHandler._wait_for_channel_ready(self, timeout)
[147](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:147) grpc.channel_ready_future(self._channel).result(timeout=timeout)
--> [148](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:148) self._setup_identifier_interceptor(self._user, timeout=timeout)
[149](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:149) except grpc.FutureTimeoutError as e:
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:266, in GrpcHandler._setup_identifier_interceptor(self, user, timeout)
[265](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:265) host = socket.gethostname()
--> [266](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:266) self._identifier = self.__internal_register(user, host, timeout=timeout)
[267](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:267) self._identifier_interceptor = interceptor.header_adder_interceptor(
[268](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:268) ["identifier"], [str(self._identifier)]
[269](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:269) )
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:161, in error_handler.<locals>.wrapper.<locals>.handler(*args, **kwargs)
[157](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:157) LOGGER.error(
[158](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:158) f"grpc RpcError: [{inner_name}], <{e.__class__.__name__}: "
[159](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:159) f"{e.code()}, {e.details()}>, <Time:{record_dict}>"
[160](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:160) )
--> [161](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:161) raise e from e
[162](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:162) except Exception as e:
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:143, in error_handler.<locals>.wrapper.<locals>.handler(*args, **kwargs)
[142](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:142) record_dict["RPC start"] = str(datetime.datetime.now())
--> [143](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:143) return func(*args, **kwargs)
[144](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:144) except MilvusException as e:
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:182, in tracing_request.<locals>.wrapper.<locals>.handler(self, *args, **kwargs)
[181](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:181) self.set_onetime_request_id(req_id)
--> [182](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:182) return func(self, *args, **kwargs)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:91, in retry_on_rpc_failure.<locals>.wrapper.<locals>.handler(*args, **kwargs)
[90](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:90) if e.code() in IGNORE_RETRY_CODES:
---> [91](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:91) raise e from e
[92](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:92) if timeout(start_time):
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:87, in retry_on_rpc_failure.<locals>.wrapper.<locals>.handler(*args, **kwargs)
[86](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:86) try:
---> [87](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:87) return func(*args, **kwargs)
[88](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:88) except grpc.RpcError as e:
[89](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:89) # Do not retry on these codes
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:220, in upgrade_reminder.<locals>.handler(*args, **kwargs)
[219](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:219) raise MilvusException(message=msg) from e
--> [220](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:220) raise e from e
[221](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:221) except Exception as e:
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:212, in upgrade_reminder.<locals>.handler(*args, **kwargs)
[211](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:211) try:
--> [212](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:212) return func(*args, **kwargs)
[213](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:213) except grpc.RpcError as e:
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1965, in GrpcHandler.__internal_register(self, user, host, **kwargs)
[1964](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1964) req = Prepare.register_request(user, host)
-> [1965](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1965) response = self._stub.Connect(request=req)
[1966](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1966) check_status(response.status)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:277, in _UnaryUnaryMultiCallable.__call__(self, request, timeout, metadata, credentials, wait_for_ready, compression)
[268](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:268) def __call__(
[269](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:269) self,
[270](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:270) request: Any,
(...)
[275](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:275) compression: Optional[grpc.Compression] = None,
[276](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:276) ) -> Any:
--> [277](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:277) response, ignored_call = self._with_call(
[278](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:278) request,
[279](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:279) timeout=timeout,
[280](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:280) metadata=metadata,
[281](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:281) credentials=credentials,
[282](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:282) wait_for_ready=wait_for_ready,
[283](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:283) compression=compression,
[284](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:284) )
[285](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:285) return response
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:332, in _UnaryUnaryMultiCallable._with_call(self, request, timeout, metadata, credentials, wait_for_ready, compression)
[329](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:329) call = self._interceptor.intercept_unary_unary(
[330](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:330) continuation, client_call_details, request
[331](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:331) )
--> [332](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:332) return call.result(), call
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:437, in _InactiveRpcError.result(self, timeout)
[436](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:436) """See grpc.Future.result."""
--> [437](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:437) raise self
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:315, in _UnaryUnaryMultiCallable._with_call.<locals>.continuation(new_details, request)
[314](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:314) try:
--> [315](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:315) response, call = self._thunk(new_method).with_call(
[316](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:316) request,
[317](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:317) timeout=new_timeout,
[318](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:318) metadata=new_metadata,
[319](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:319) credentials=new_credentials,
[320](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:320) wait_for_ready=new_wait_for_ready,
[321](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:321) compression=new_compression,
[322](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:322) )
[323](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:323) return _UnaryOutcome(response, call)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1177, in _UnaryUnaryMultiCallable.with_call(self, request, timeout, metadata, credentials, wait_for_ready, compression)
[1171](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1171) (
[1172](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1172) state,
[1173](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1173) call,
[1174](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1174) ) = self._blocking(
[1175](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1175) request, timeout, metadata, credentials, wait_for_ready, compression
[1176](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1176) )
-> [1177](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1177) return _end_unary_response_blocking(state, call, True, None)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1003, in _end_unary_response_blocking(state, call, with_call, deadline)
[1002](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1002) else:
-> [1003](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1003) raise _InactiveRpcError(state)
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAUTHENTICATED
details = "missing authorization in header"
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-05-27T15:41:38.647605945+02:00", grpc_status:16, grpc_message:"missing authorization in header"}"
>
The above exception was the direct cause of the following exception:
_InactiveRpcError Traceback (most recent call last)
Cell In[12], [line 1](vscode-notebook-cell:?execution_count=12&line=1)
----> [1](vscode-notebook-cell:?execution_count=12&line=1) vector_store = MilvusVectorStore(uri="http://localhost:19530/", dim=1024, token="root:Milvus",enable_sparse=True)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:269, in MilvusVectorStore.__init__(self, uri, token, collection_name, dim, embedding_field, doc_id_field, similarity_metric, consistency_level, overwrite, text_key, output_fields, index_config, search_config, batch_size, enable_sparse, sparse_embedding_function, hybrid_ranker, hybrid_ranker_params, **kwargs)
[267](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:267) else:
[268](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:268) host, port = extract_host_port(uri)
--> [269](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:269) connections.connect("default", host=host, port=port)
[270](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:270) self._collection = Collection(collection_name)
[272](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/llama_index/vector_stores/milvus/base.py:272) self._create_index_if_required()
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:447, in Connections.connect(self, alias, user, password, db_name, token, **kwargs)
[444](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:444) if parsed_uri.scheme == "https":
[445](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:445) kwargs["secure"] = True
--> [447](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:447) connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
[448](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:448) return
[450](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:450) # 2nd Priority, connection configs from env
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:398, in Connections.connect.<locals>.connect_milvus(**kwargs)
[395](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:395) t = kwargs.get("timeout")
[396](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:396) timeout = t if isinstance(t, (int, float)) else Config.MILVUS_CONN_TIMEOUT
--> [398](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:398) gh._wait_for_channel_ready(timeout=timeout)
[399](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:399) if kwargs.get("keep_alive", False):
[400](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:400) gh.register_state_change_callback(
[401](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:401) ReconnectHandler(self, alias, kwargs_copy).reconnect_on_idle
[402](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/orm/connections.py:402) )
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:155, in GrpcHandler._wait_for_channel_ready(self, timeout)
[150](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:150) raise MilvusException(
[151](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:151) code=Status.CONNECT_FAILED,
[152](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:152) message=f"Fail connecting to server on {self._address}, illegal connection params or server unavailable",
[153](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:153) ) from e
[154](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:154) except Exception as e:
--> [155](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:155) raise e from e
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:148, in GrpcHandler._wait_for_channel_ready(self, timeout)
[146](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:146) try:
[147](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:147) grpc.channel_ready_future(self._channel).result(timeout=timeout)
--> [148](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:148) self._setup_identifier_interceptor(self._user, timeout=timeout)
[149](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:149) except grpc.FutureTimeoutError as e:
[150](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:150) raise MilvusException(
[151](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:151) code=Status.CONNECT_FAILED,
[152](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:152) message=f"Fail connecting to server on {self._address}, illegal connection params or server unavailable",
[153](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:153) ) from e
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:266, in GrpcHandler._setup_identifier_interceptor(self, user, timeout)
[264](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:264) def _setup_identifier_interceptor(self, user: str, timeout: int = 10):
[265](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:265) host = socket.gethostname()
--> [266](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:266) self._identifier = self.__internal_register(user, host, timeout=timeout)
[267](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:267) self._identifier_interceptor = interceptor.header_adder_interceptor(
[268](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:268) ["identifier"], [str(self._identifier)]
[269](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:269) )
[270](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:270) self._final_channel = grpc.intercept_channel(
[271](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:271) self._final_channel, self._identifier_interceptor
[272](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:272) )
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:161, in error_handler.<locals>.wrapper.<locals>.handler(*args, **kwargs)
[156](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:156) record_dict["gRPC error"] = str(datetime.datetime.now())
[157](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:157) LOGGER.error(
[158](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:158) f"grpc RpcError: [{inner_name}], <{e.__class__.__name__}: "
[159](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:159) f"{e.code()}, {e.details()}>, <Time:{record_dict}>"
[160](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:160) )
--> [161](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:161) raise e from e
[162](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:162) except Exception as e:
[163](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:163) record_dict["Exception"] = str(datetime.datetime.now())
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:143, in error_handler.<locals>.wrapper.<locals>.handler(*args, **kwargs)
[141](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:141) try:
[142](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:142) record_dict["RPC start"] = str(datetime.datetime.now())
--> [143](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:143) return func(*args, **kwargs)
[144](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:144) except MilvusException as e:
[145](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:145) record_dict["RPC error"] = str(datetime.datetime.now())
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:182, in tracing_request.<locals>.wrapper.<locals>.handler(self, *args, **kwargs)
[180](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:180) if req_id:
[181](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:181) self.set_onetime_request_id(req_id)
--> [182](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:182) return func(self, *args, **kwargs)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:91, in retry_on_rpc_failure.<locals>.wrapper.<locals>.handler(*args, **kwargs)
[88](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:88) except grpc.RpcError as e:
[89](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:89) # Do not retry on these codes
[90](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:90) if e.code() in IGNORE_RETRY_CODES:
---> [91](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:91) raise e from e
[92](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:92) if timeout(start_time):
[93](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:93) raise MilvusException(e.code, f"{to_msg}, message={e.details()}") from e
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:87, in retry_on_rpc_failure.<locals>.wrapper.<locals>.handler(*args, **kwargs)
[85](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:85) while True:
[86](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:86) try:
---> [87](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:87) return func(*args, **kwargs)
[88](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:88) except grpc.RpcError as e:
[89](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:89) # Do not retry on these codes
[90](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:90) if e.code() in IGNORE_RETRY_CODES:
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:220, in upgrade_reminder.<locals>.handler(*args, **kwargs)
[215](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:215) msg = (
[216](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:216) "this version of sdk is incompatible with server, "
[217](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:217) "please downgrade your sdk or upgrade your server"
[218](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:218) )
[219](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:219) raise MilvusException(message=msg) from e
--> [220](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:220) raise e from e
[221](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:221) except Exception as e:
[222](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:222) raise e from e
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:212, in upgrade_reminder.<locals>.handler(*args, **kwargs)
[209](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:209) @functools.wraps(func)
[210](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:210) def handler(*args, **kwargs):
[211](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:211) try:
--> [212](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:212) return func(*args, **kwargs)
[213](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:213) except grpc.RpcError as e:
[214](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/decorators.py:214) if e.code() == grpc.StatusCode.UNIMPLEMENTED:
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1965, in GrpcHandler.__internal_register(self, user, host, **kwargs)
[1961](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1961) @retry_on_rpc_failure()
[1962](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1962) @upgrade_reminder
[1963](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1963) def __internal_register(self, user: str, host: str, **kwargs) -> int:
[1964](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1964) req = Prepare.register_request(user, host)
-> [1965](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1965) response = self._stub.Connect(request=req)
[1966](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1966) check_status(response.status)
[1967](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py:1967) return response.identifier
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:277, in _UnaryUnaryMultiCallable.__call__(self, request, timeout, metadata, credentials, wait_for_ready, compression)
[268](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:268) def __call__(
[269](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:269) self,
[270](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:270) request: Any,
(...)
[275](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:275) compression: Optional[grpc.Compression] = None,
[276](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:276) ) -> Any:
--> [277](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:277) response, ignored_call = self._with_call(
[278](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:278) request,
[279](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:279) timeout=timeout,
[280](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:280) metadata=metadata,
[281](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:281) credentials=credentials,
[282](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:282) wait_for_ready=wait_for_ready,
[283](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:283) compression=compression,
[284](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:284) )
[285](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:285) return response
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:332, in _UnaryUnaryMultiCallable._with_call(self, request, timeout, metadata, credentials, wait_for_ready, compression)
[327](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:327) return _FailureOutcome(exception, sys.exc_info()[2])
[329](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:329) call = self._interceptor.intercept_unary_unary(
[330](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:330) continuation, client_call_details, request
[331](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:331) )
--> [332](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:332) return call.result(), call
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:437, in _InactiveRpcError.result(self, timeout)
[433](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:433) def result(
[434](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:434) self, timeout: Optional[float] = None
[435](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:435) ) -> Any: # pylint: disable=unused-argument
[436](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:436) """See grpc.Future.result."""
--> [437](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:437) raise self
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:315, in _UnaryUnaryMultiCallable._with_call.<locals>.continuation(new_details, request)
[306](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:306) (
[307](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:307) new_method,
[308](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:308) new_timeout,
(...)
[312](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:312) new_compression,
[313](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:313) ) = _unwrap_client_call_details(new_details, client_call_details)
[314](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:314) try:
--> [315](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:315) response, call = self._thunk(new_method).with_call(
[316](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:316) request,
[317](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:317) timeout=new_timeout,
[318](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:318) metadata=new_metadata,
[319](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:319) credentials=new_credentials,
[320](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:320) wait_for_ready=new_wait_for_ready,
[321](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:321) compression=new_compression,
[322](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:322) )
[323](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:323) return _UnaryOutcome(response, call)
[324](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_interceptor.py:324) except grpc.RpcError as rpc_error:
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1177, in _UnaryUnaryMultiCallable.with_call(self, request, timeout, metadata, credentials, wait_for_ready, compression)
[1162](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1162) def with_call(
[1163](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1163) self,
[1164](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1164) request: Any,
(...)
[1169](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1169) compression: Optional[grpc.Compression] = None,
[1170](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1170) ) -> Tuple[Any, grpc.Call]:
[1171](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1171) (
[1172](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1172) state,
[1173](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1173) call,
[1174](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1174) ) = self._blocking(
[1175](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1175) request, timeout, metadata, credentials, wait_for_ready, compression
[1176](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1176) )
-> [1177](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1177) return _end_unary_response_blocking(state, call, True, None)
File ~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1003, in _end_unary_response_blocking(state, call, with_call, deadline)
[1001](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1001) return state.response
[1002](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1002) else:
-> [1003](https://file+.vscode-resource.vscode-cdn.net/home/poclain/Documents/LLM_from_base/~/Documents/LLM_from_base/.venv/lib/python3.11/site-packages/grpc/_channel.py:1003) raise _InactiveRpcError(state)
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAUTHENTICATED
details = "missing authorization in header"
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-05-27T15:41:38.647605945+02:00", grpc_status:16, grpc_message:"missing authorization in header"}"
You can try the latest version llama-index-vector-stores-milvus-0.1.16
, per this PR https://github.com/run-llama/llama_index/commit/46331976ae3127011921521a20ea93ec0ef68776, Unify the collection construction regardless of the value of enable_sparse. @osafaimal
Bug Description
The
MilvusVectorStore
failed to connect non-localhost uri whenenable_sparse
isTrue
Version
0.10.36
Steps to Reproduce
For the codes
Connection error
Fail connecting to server on localhost:19530, illegal connection params or server unavailable
Relevant Logs/Tracbacks