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]: call Collection(collection_name, using=alias) error : weakly-referenced object no longer exists #2567

Open
1 task done
bxgong opened this issue Jan 15, 2025 · 0 comments
Labels
kind/bug Something isn't working

Comments

@bxgong
Copy link

bxgong commented Jan 15, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

when I call Collection(collection_name, using=alias) , this collection contains auto bm25 function fields,
met the following exception :

during : Function.construct_from_dict(function_raw)
input_field_names = (
[input_field_names] if isinstance(input_field_names, str) else input_field_names
)
the input_field_names and output_field_names in function_raw is not str, the type is : <class 'google.protobuf.internal.containers.RepeatedScalarFieldContainer'>

this lead to the following error: copy.deepcopy(function)

File "###\Python311\Lib\site-packages\pymilvus\orm\collection.py", line 127, in init
server_schema = CollectionSchema.construct_from_dict(resp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "###\Python311\Lib\site-packages\pymilvus\orm\schema.py", line 257, in construct_from_dict
return CollectionSchema(
^^^^^^^^^^^^^^^^^
File "###\Python311\Lib\site-packages\pymilvus\orm\schema.py", line 111, in init
self._functions = [copy.deepcopy(function) for function in functions]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "###\Python311\Lib\site-packages\pymilvus\orm\schema.py", line 111, in
self._functions = [copy.deepcopy(function) for function in functions]
^^^^^^^^^^^^^^^^^^^^^^^
File "###\Python311\Lib\copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "###\Python311\Lib\copy.py", line 271, in _reconstruct
state = deepcopy(state, memo)
^^^^^^^^^^^^^^^^^^^^^
File "###\Python311\Lib\copy.py", line 146, in deepcopy
y = copier(x, memo)
^^^^^^^^^^^^^^^
File "###\Python311\Lib\copy.py", line 231, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
^^^^^^^^^^^^^^^^^^^^^
File "###\Python311\Lib\copy.py", line 153, in deepcopy
y = copier(memo)

Expected Behavior

in Collection(collection_name, using=alias) ,
resp = conn.describe_collection(self._name, **kwargs)
the "functions" field in resp seems have not convert to 'google.protobuf.internal.containers.RepeatedScalarFieldContainer' object to simple str list

Steps/Code To Reproduce behavior

create a collection which contains bm25 function field(prepare for use Full Text Search),
then use  Collection(collection_name, using=alias)  to get the handler of this collection

Environment details

- Method of installation (Docker):
- Milvus version (v2.5.1):
- pymilvus version 2.5.1

Anything else?

No response

@bxgong bxgong added the kind/bug Something isn't working label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant