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

Error when using Client.encode() on a docarray created from the amazon-berkeley-objects-dataset #879

Open
devinzli opened this issue Dec 20, 2022 · 3 comments

Comments

@devinzli
Copy link

Here is the trace.
`Traceback (most recent call last):
File "C:\Python\Python37\lib\site-packages\jina\clients\helper.py", line 47, in _arg_wrapper
return func(*args, **kwargs)
File "C:\Python\Python37\lib\site-packages\clip_client\client.py", line 169, in _gather_result
results[r[:, 'id']][:, attribute] = r[:, attribute]
File "C:\Python\Python37\lib\site-packages\docarray\array\mixins\getitem.py", line 102, in getitem
elif isinstance(index[0], bool):
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File ".\main.py", line 15, in
encoded_docarray = clt.encode(doc_array, show_progress=True)
File "C:\Python\Python37\lib\site-packages\clip_client\client.py", line 336, in encode
parameters=parameters,
File "C:\Python\Python37\lib\site-packages\jina\clients\mixin.py", line 288, in post
**kwargs,
File "C:\Python\Python37\lib\site-packages\jina\helper.py", line 1342, in run_async
return future.result()
File "C:\Python\Python37\lib\site-packages\jina\clients\mixin.py", line 264, in _get_results
async for resp in c._get_results(*args, **kwargs):
return future.result() File "C:\Python\Python37\lib\site-packages\jina\clients\mixin.py", line 264, in _get_results
async for resp in c._get_results(*args, **kwargs): File "C:\Python\Python37\lib\site-packages\jina\clients\base\grpc.py", line 146, in _get_results
logger=self.logger, File "C:\Python\Python37\lib\site-packages\jina\clients\helper.py", line 83, in callback_exec
_safe_callback(on_done, continue_on_error, logger)(response)
File "C:\Python\Python37\lib\site-packages\jina\clients\helper.py", line 49, in _arg_wrapper
err_msg = f'uncaught exception in callback {func.name}(): {ex!r}'
AttributeError: 'functools.partial' object has no attribute 'name'`

@ZiniuYu
Copy link
Member

ZiniuYu commented Dec 21, 2022

Hi, what's your reproducible script? Please make sure the input is valid and complete.

@devinzli
Copy link
Author

This is what I did.

from docarray import DocumentArray, Document
from clip_client import Client
import numpy as np

doc_array = DocumentArray.pull('amazon-berkeley-objects-dataset', show_progress=True)
clt = Client('grpcs://api.clip.jina.ai:2096', credential={'Authorization': 'insert-authorization-code'})
encoded_docarray = clt.encode(doc_array, show_progress=True)

@ZiniuYu
Copy link
Member

ZiniuYu commented Mar 2, 2023

@devinzli Hi, we improved our services over the past weeks. Can you try again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants