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: "Unexpected <class 'KeyError'>: 'clip_encoder'" #139

Closed
fbauer-kunbus opened this issue Nov 23, 2022 · 15 comments
Closed

Error: "Unexpected <class 'KeyError'>: 'clip_encoder'" #139

fbauer-kunbus opened this issue Nov 23, 2022 · 15 comments

Comments

@fbauer-kunbus
Copy link

Is this still actively maintained? Currently getting this error when submitting ...

Exception in thread Thread-19:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/jina/clients/base/grpc.py", line 129, in _get_results
    timeout=kwargs.get('timeout', None),
  File "/usr/local/lib/python3.7/dist-packages/grpc/aio/_call.py", line 326, in _fetch_stream_responses
    await self._raise_for_status()
  File "/usr/local/lib/python3.7/dist-packages/grpc/aio/_call.py", line 237, in _raise_for_status
    self._cython_call.status())
grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
	status = StatusCode.UNKNOWN
	details = "Unexpected <class 'KeyError'>: 'clip_encoder'"
	debug_error_string = "{"created":"@1669193768.070137746","description":"Error received from peer ipv4:3.221.225.207:443","file":"src/core/lib/surface/call.cc","file_line":966,"grpc_message":"Unexpected <class 'KeyError'>: 'clip_encoder'","grpc_status":2}"
@OmightyDurn
Copy link

I am also getting this error.

@JoanFM
Copy link
Member

JoanFM commented Nov 23, 2022

We are going to take a look at it

May u share exactly the steps u took to reproduce?

@OmightyDurn
Copy link

OmightyDurn commented Nov 23, 2022

For me:

  1. pip install "docarray[common]>=0.13.5" jina
  2. Ran this script:
from docarray import Document

server = 'grpcs://dalle-flow.dev.jina.ai'

prompt = "10th Doctor from Doctor Who in the style of starry night by Van Gogh"

doc = Document(text=prompt).post(server, parameters={'num_images': 1})
da = doc.matches

da.plot_image_sprites(fig_size=(10,10), show_index=True)

I have not moved on to the next portion of the read me due to the fact that this will not run.

@fbauer-kunbus
Copy link
Author

I restartet the colab this morning and now I see that the first step (!pip install jina) finishes with the following ERROR

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.9.2 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.3 which is incompatible.
tensorboard 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.3 which is incompatible.
grpcio-status 1.48.2 requires grpcio>=1.48.2, but you have grpcio 1.47.2 which is incompatible.
Successfully installed aiofiles-22.1.0 aiostream-0.4.5 anyio-3.6.2 asgiref-3.5.2 backoff-2.2.1 commonmark-0.9.1 cryptography-38.0.3 deprecated-1.2.13 docarray-0.19.0 docker-5.0.3 fastapi-0.87.0 grpcio-1.47.2 grpcio-health-checking-1.47.2 grpcio-reflection-1.47.2 h11-0.14.0 httptools-0.5.0 jcloud-0.1.1 jina-3.11.2 jina-hubble-sdk-0.26.4 lz4-4.0.2 opentelemetry-api-1.14.0 opentelemetry-exporter-otlp-1.14.0 opentelemetry-exporter-otlp-proto-grpc-1.14.0 opentelemetry-exporter-otlp-proto-http-1.14.0 opentelemetry-exporter-prometheus-1.12.0rc1 opentelemetry-instrumentation-0.35b0 opentelemetry-instrumentation-aiohttp-client-0.35b0 opentelemetry-instrumentation-asgi-0.35b0 opentelemetry-instrumentation-fastapi-0.35b0 opentelemetry-instrumentation-grpc-0.35b0 opentelemetry-proto-1.14.0 opentelemetry-sdk-1.14.0 opentelemetry-semantic-conventions-0.35b0 opentelemetry-util-http-0.35b0 pathspec-0.10.2 protobuf-3.20.3 python-dotenv-0.21.0 python-multipart-0.0.5 rich-12.6.0 sniffio-1.3.0 starlette-0.21.0 uvicorn-0.20.0 uvloop-0.17.0 watchfiles-0.18.1 websocket-client-1.4.2 websockets-10.4

WARNING: The following packages were previously imported in this runtime:
  [google]
You must restart the runtime in order to use newly installed versions.

I guess this is what is causing the subsequent problem - but I overlooked it yesterday. BUT: even clicking the 'Restart Runtime' button below the error message and afterwards with or without trying step 1 again the error at step 4 persists.

@JoanFM
Copy link
Member

JoanFM commented Nov 24, 2022

Can u try again?

@fbauer-kunbus
Copy link
Author

Sorry, have been absent a while ... the error in step 4 now looks as follows:

Exception in thread Thread-12:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/jina/clients/base/grpc.py", line 129, in _get_results
    timeout=kwargs.get('timeout', None),
  File "/usr/local/lib/python3.7/dist-packages/grpc/aio/_call.py", line 326, in _fetch_stream_responses
    await self._raise_for_status()
  File "/usr/local/lib/python3.7/dist-packages/grpc/aio/_call.py", line 237, in _raise_for_status
    self._cython_call.status())
grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
	status = StatusCode.NOT_FOUND
	details = "no Route matched with those values"
	debug_error_string = "{"created":"@1669364639.007159167","description":"Error received from peer ipv4:100.24.178.141:443","file":"src/core/lib/surface/call.cc","file_line":966,"grpc_message":"no Route matched with those values","grpc_status":5}"
>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/dist-packages/jina/helper.py", line 1303, in run
    self.result = asyncio.run(func(*args, **kwargs))
  File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.7/dist-packages/jina/clients/mixin.py", line 262, in _get_results
    async for resp in c._get_results(*args, **kwargs):
  File "/usr/local/lib/python3.7/dist-packages/jina/clients/base/grpc.py", line 172, in _get_results
    raise BadServerFlow(msg) from err
jina.excepts.BadServerFlow: gRPC error: StatusCode.NOT_FOUND no Route matched with those values

---------------------------------------------------------------------------

AttributeError                            Traceback (most recent call last)

[/usr/local/lib/python3.7/dist-packages/jina/helper.py](https://localhost:8080/#) in run_async(func, *args, **kwargs)
   1317             try:
-> 1318                 return thread.result
   1319             except AttributeError:

AttributeError: '_RunThread' object has no attribute 'result'


During handling of the above exception, another exception occurred:

BadClient                                 Traceback (most recent call last)

<timed exec> in <module>

3 frames

[/usr/local/lib/python3.7/dist-packages/jina/helper.py](https://localhost:8080/#) in run_async(func, *args, **kwargs)
   1321 
   1322                 raise BadClient(
-> 1323                     'something wrong when running the eventloop, result can not be retrieved'
   1324                 )
   1325         else:

BadClient: something wrong when running the eventloop, result can not be retrieved

@OmightyDurn
Copy link

I also got the "No route matched with those values" error

@JoanFM
Copy link
Member

JoanFM commented Nov 30, 2022

Can u retry now?

@fbauer-kunbus
Copy link
Author

fbauer-kunbus commented Nov 30, 2022

Sorry, I don't understand why you - obviously - get other results, than we do, when you run it and let us retry? Does it ACTUALLY run for you?

In the first '!pip install jina' step I STILL geht the ERROR:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.9.2 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.3 which is incompatible.
tensorboard 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.3 which is incompatible.
grpcio-status 1.48.2 requires grpcio>=1.48.2, but you have grpcio 1.47.0 which is incompatible.
Successfully installed aiofiles-22.1.0 aiostream-0.4.5 anyio-3.6.2 asgiref-3.5.2 backoff-2.2.1 commonmark-0.9.1 cryptography-38.0.4 deprecated-1.2.13 docarray-0.19.1 docker-5.0.3 fastapi-0.88.0 grpcio-1.47.0 grpcio-health-checking-1.47.0 grpcio-reflection-1.47.0 h11-0.14.0 httptools-0.5.0 jcloud-0.1.4 jina-3.12.0 jina-hubble-sdk-0.26.9 opentelemetry-api-1.14.0 opentelemetry-exporter-otlp-1.14.0 opentelemetry-exporter-otlp-proto-grpc-1.14.0 opentelemetry-exporter-otlp-proto-http-1.14.0 opentelemetry-exporter-prometheus-1.12.0rc1 opentelemetry-instrumentation-0.35b0 opentelemetry-instrumentation-aiohttp-client-0.35b0 opentelemetry-instrumentation-asgi-0.35b0 opentelemetry-instrumentation-fastapi-0.35b0 opentelemetry-instrumentation-grpc-0.35b0 opentelemetry-proto-1.14.0 opentelemetry-sdk-1.14.0 opentelemetry-semantic-conventions-0.35b0 opentelemetry-util-http-0.35b0 pathspec-0.10.2 protobuf-3.20.3 python-dotenv-0.21.0 python-multipart-0.0.5 rich-12.6.0 sniffio-1.3.0 starlette-0.22.0 uvicorn-0.20.0 uvloop-0.17.0 watchfiles-0.18.1 websocket-client-1.4.2 websockets-10.4

WARNING: The following packages were previously imported in this runtime:
  [google]
You must restart the runtime in order to use newly installed versions.

And then the step with the heading 'Let's submit it to the server and visualize the results:' it STILL terminates with this error:

xception in thread Thread-12:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/jina/clients/base/grpc.py", line 138, in _get_results
    timeout=kwargs.get('timeout', None),
  File "/usr/local/lib/python3.7/dist-packages/grpc/aio/_call.py", line 326, in _fetch_stream_responses
    await self._raise_for_status()
  File "/usr/local/lib/python3.7/dist-packages/grpc/aio/_call.py", line 237, in _raise_for_status
    self._cython_call.status())
grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
	status = StatusCode.NOT_FOUND
	details = "no Route matched with those values"
	debug_error_string = "{"created":"@1669800056.298830757","description":"Error received from peer ipv4:3.221.225.207:443","file":"src/core/lib/surface/call.cc","file_line":966,"grpc_message":"no Route matched with those values","grpc_status":5}"
>

I disconnected and reconnected the Runtime multiple times - but it has no effect at all.
I really appreciate your efforts - but what is it that you do differently from us when it successfully works for you?

@JoanFM
Copy link
Member

JoanFM commented Nov 30, 2022

My bad @fbauer-kunbus ,

We are doing updates which I thought were already there. Misscommunication inside the team. I will keep you posted when I can run it successfully

@JoanFM
Copy link
Member

JoanFM commented Dec 1, 2022

Hey @fbauer-kunbus ,

Now it should be working.

@fbauer-kunbus
Copy link
Author

Guys, it worked for some time today ... thanks for that!
BUT now I get this error message (again):

Exception in thread Thread-19:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/jina/clients/base/grpc.py", line 133, in _get_results
    async for resp in stub.Call(
  File "/usr/local/lib/python3.8/dist-packages/grpc/aio/_call.py", line 326, in _fetch_stream_responses
    await self._raise_for_status()
  File "/usr/local/lib/python3.8/dist-packages/grpc/aio/_call.py", line 236, in _raise_for_status
    raise _create_rpc_error(await self.initial_metadata(), await
grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
	status = StatusCode.NOT_FOUND
	details = "no Route matched with those values"
	debug_error_string = "{"created":"@1669906590.939952043","description":"Error received from peer ipv4:52.201.120.16:443","file":"src/core/lib/surface/call.cc","file_line":966,"grpc_message":"no Route matched with those values","grpc_status":5}"
>

@OmightyDurn
Copy link

Same for me

Traceback (most recent call last):
File "C:\Users\adarwoo\AppData\Local\Programs\Python\Python38\lib\site-packages\jina\clients\base\grpc.py", line 124, in _get_results
async for resp in stub.Call(
File "C:\Users\adarwoo\AppData\Local\Programs\Python\Python38\lib\site-packages\grpc\aio_call.py", line 326, in _fetch_stream_responses
await self._raise_for_status()
File "C:\Users\adarwoo\AppData\Local\Programs\Python\Python38\lib\site-packages\grpc\aio_call.py", line 236, in _raise_for_status
raise _create_rpc_error(await self.initial_metadata(), await
grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
status = StatusCode.NOT_FOUND
details = "no Route matched with those values"
debug_error_string = "{"created":"@1669907010.784000000","description":"Error received from peer ipv4:44.212.139.161:443","file":"src/core/lib/surface/call.cc","file_line":967,"grpc_message":"no Route matched with those values","grpc_status":5}"

@JoanFM
Copy link
Member

JoanFM commented Dec 1, 2022

Apologies @OmightyDurn and @fbauer-kunbus , the Flow was removed. We are doing some migrations and have done a few errors along the way.

Now this is working again!!!!

@OmightyDurn
Copy link

I've had a successful run! Thanks for all the hard work you all do! I'm excited to jump into this finally!

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

3 participants