Python client grpc error

We are using a Python program to upload data to Daml Hub. We often get grpc errors, but usually the process finishes successfully.

The Python dependencies are enclosed in a venv environment.

Now when trying from one particular machine the process stops halfway through with the following error message:

  File "/Users/ryanmedlen/DevOps/SOR-DAML/scripts/product_setup/lib/python3.9/site-packages/dazl/ledger/grpc/conn_aio.py", line 316, in exercise
    response = await retry(
  File "/Users/ryanmedlen/DevOps/SOR-DAML/scripts/product_setup/lib/python3.9/site-packages/dazl/ledger/_retry.py", line 42, in retry
    return await fn()
  File "/Users/ryanmedlen/DevOps/SOR-DAML/scripts/product_setup/lib/python3.9/site-packages/grpc/aio/_call.py", line 290, in __await__
    raise _create_rpc_error(self._cython_call._initial_metadata,
grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
    status = StatusCode.UNIMPLEMENTED
    details = ""
    debug_error_string = "UNKNOWN:Error received from peer ipv4:34.117.1.147:443 {created_time:"2023-04-11T09:43:12.265316-05:00", grpc_status:12, grpc_message:""}"
>

From another machine it runs as usual.

Can anybody spot anything in the error which could help us to understand what’s going on?

Some more context around the error might be helpful; UNIMPLEMENTED is definitely a strange error to be getting from one machine and not another, though.

Are these two machines both on the same network or are they trying to connect from completely different places?

1 Like

I’m not sure whether that’s the case here, but to the best of my understanding certain gRPC proxies return UNIMPLEMENTED when they start up but before they are able to mount the proxied route and serve it. If that’s the case, a simple retry logic might get the job done.

1 Like

The machines run independently from each other.

The strange thing is that we get the error from one machine consistently and runs the process from another machine fine consistently.

If this error gives no useful clue we will submit a support ticket.

Thanks… yeah, I think a support ticket in this case is best as we might need to gather more information to trace down what is happening here.

1 Like