Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The error message for insertion errors is not user-friendly. #36983

Closed
1 task done
zhuwenxing opened this issue Oct 18, 2024 · 3 comments
Closed
1 task done

[Bug]: The error message for insertion errors is not user-friendly. #36983

zhuwenxing opened this issue Oct 18, 2024 · 3 comments
Assignees
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@zhuwenxing
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version:master-20750c0-20241017
- Deployment mode(standalone or cluster):
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2):2.5.0rc96
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

(code=The data fields number is not match with schema., message=)

There are two issues here. The code is filled with messages, resulting in the message having no value. Additionally, the error message is too vague and does not allow for direct identification of which field is missing data or which field has excess data.

[2024-10-18 12:13:40 - ERROR - pymilvus.decorators]: RPC error: [insert_rows], <ParamError: (code=The data fields number is not match with schema., message=)>, <Time:{'RPC start': '2024-10-18 12:13:40.167573', 'RPC error': '2024-10-18 12:13:40.877993'}> (decorators.py:140)

Expected Behavior

No response

Steps To Reproduce

No response

Milvus Log

No response

Anything else?

No response

@zhuwenxing zhuwenxing added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 18, 2024
@XuanYang-cn
Copy link
Contributor

/assign
code and message passing wrong error, will fix it soon

XuanYang-cn added a commit to XuanYang-cn/pymilvus that referenced this issue Oct 21, 2024
sre-ci-robot pushed a commit to milvus-io/pymilvus that referenced this issue Oct 21, 2024
XuanYang-cn added a commit to XuanYang-cn/pymilvus that referenced this issue Oct 21, 2024
@yanliang567 yanliang567 removed their assignment Oct 21, 2024
@yanliang567 yanliang567 added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 21, 2024
sre-ci-robot pushed a commit to milvus-io/pymilvus that referenced this issue Oct 21, 2024
@XuanYang-cn
Copy link
Contributor

should've been fixed, please help verify
/unassign
/assign @zhuwenxing

@zhuwenxing
Copy link
Contributor Author

verified and fixed in 2.5.0rc101
new error code and message

[2024-10-22 10:41:58 - ERROR - pymilvus.decorators]: RPC error: [insert_rows], <DataNotMatchException: (code=1, message=Insert missed an field `text` to collection without set nullable==true or set default_value)>, <Time:{'RPC start': '2024-10-22 10:41:58.197317', 'RPC error': '2024-10-22 10:41:58.353096'}> (decorators.py:140)
[2024-10-22 10:41:58 - ERROR - ci_test]: Traceback (most recent call last):
  File "/Users/zilliz/workspace/milvus/tests/python_client/utils/api_request.py", line 32, in inner_wrapper
    res = func(*args, **_kwargs)
  File "/Users/zilliz/workspace/milvus/tests/python_client/utils/api_request.py", line 63, in api_request
    return func(*arg, **kwargs)
  File "/Users/zilliz/opt/anaconda3/envs/full_text_search/lib/python3.8/site-packages/pymilvus/orm/collection.py", line 507, in insert
    return conn.insert_rows(
  File "/Users/zilliz/opt/anaconda3/envs/full_text_search/lib/python3.8/site-packages/pymilvus/decorators.py", line 141, in handler
    raise e from e
  File "/Users/zilliz/opt/anaconda3/envs/full_text_search/lib/python3.8/site-packages/pymilvus/decorators.py", line 137, in handler
    return func(*args, **kwargs)
  File "/Users/zilliz/opt/anaconda3/envs/full_text_search/lib/python3.8/site-packages/pymilvus/decorators.py", line 176, in handler
    return func(self, *args, **kwargs)
  File "/Users/zilliz/opt/anaconda3/envs/full_text_search/lib/python3.8/site-packages/pymilvus/decorators.py", line 116, in handler
    raise e from e
  File "/Users/zilliz/opt/anaconda3/envs/full_text_search/lib/python3.8/site-packages/pymilvus/decorators.py", line 86, in handler
    return func(*args, **kwargs)
  File "/Users/zilliz/opt/anaconda3/envs/full_text_search/lib/python3.8/site-packages/pymilvus/client/grpc_handler.py", line 493, in insert_rows
    request = self._prepare_row_insert_request(
  File "/Users/zilliz/opt/anaconda3/envs/full_text_search/lib/python3.8/site-packages/pymilvus/client/grpc_handler.py", line 519, in _prepare_row_insert_request
    return Prepare.row_insert_param(
  File "/Users/zilliz/opt/anaconda3/envs/full_text_search/lib/python3.8/site-packages/pymilvus/client/prepare.py", line 582, in row_insert_param
    return cls._parse_row_request(request, fields_info, enable_dynamic, entities)
  File "/Users/zilliz/opt/anaconda3/envs/full_text_search/lib/python3.8/site-packages/pymilvus/client/prepare.py", line 450, in _parse_row_request
    raise DataNotMatchException(
pymilvus.exceptions.DataNotMatchException: <DataNotMatchException: (code=1, message=Insert missed an field `text` to collection without set nullable==true or set default_value)>
 (api_request.py:45)
[2024-10-22 10:41:58 - ERROR - ci_test]: (api_response) : <DataNotMatchException: (code=1, message=Insert missed an field `text` to collection without set nullable==true or set default_value)> (api_request.py:46)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants