Skip to content

[Bug]: 连接milvus输入用户名和密码和token的情况,token为None连接会报错 #3109

@danerlt

Description

@danerlt

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

https://github.com/milvus-io/pymilvus/blob/master/pymilvus/orm/connections.py
第 392 行这里

        user, password, token = str(user) or "", str(password) or "", str(token) or ""

如果token传None会将其转成“None”导致下面这样的用法连接失败

milvus_client = MilvusClient(uri="http://127.0.0.1:19530", user="user", password="password", token=None)

期望效果,当token等于None的时候就其转成空字符串,而不是 “None”

Expected Behavior

当token等于None的时候就其转成空字符串,而不是 “None”

Steps/Code To Reproduce behavior

Environment details

- Hardware/Softward conditions (OS, CPU, GPU, Memory):
- Method of installation (Docker, or from source):
- Milvus version (v0.3.1, or v0.4.0):
- Milvus configuration (Settings you made in `server_config.yaml`):

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions