# Python client grpc error

**URL:** <https://forum.canton.network/t/python-client-grpc-error/6407>\
**Category:** App Development\
**Tags:** dazl, python, damlhub\
**Created:** [April 11, 2023, 3:06pm UTC](https://forum.canton.network/t/python-client-grpc-error/6407 "2023-04-11T15:06:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [April 11, 2023, 3:06pm UTC](https://forum.canton.network/t/python-client-grpc-error/6407/1 "2023-04-11T15:06:54Z")

</div>

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:

```haskell
  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?

---

<div class="post-metadata">

**Author:** ![dtanabe](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/dtanabe/32/91_2.png) [@dtanabe](https://forum.canton.network/u/dtanabe)\
**Post date:** [April 11, 2023, 3:14pm UTC](https://forum.canton.network/t/python-client-grpc-error/6407/2 "2023-04-11T15:14:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![stefanobaghino-da](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stefanobaghino-da/32/7057_2.png) [@stefanobaghino-da](https://forum.canton.network/u/stefanobaghino-da)\
**Post date:** [April 11, 2023, 3:17pm UTC](https://forum.canton.network/t/python-client-grpc-error/6407/3 "2023-04-11T15:17:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [April 11, 2023, 3:21pm UTC](https://forum.canton.network/t/python-client-grpc-error/6407/4 "2023-04-11T15:21:27Z")

</div>

The machines run independently from each other.

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [April 11, 2023, 3:22pm UTC](https://forum.canton.network/t/python-client-grpc-error/6407/5 "2023-04-11T15:22:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [April 11, 2023, 3:22pm UTC](https://forum.canton.network/t/python-client-grpc-error/6407/6 "2023-04-11T15:22:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dtanabe](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/dtanabe/32/91_2.png) [@dtanabe](https://forum.canton.network/u/dtanabe)\
**Post date:** [April 11, 2023, 3:24pm UTC](https://forum.canton.network/t/python-client-grpc-error/6407/7 "2023-04-11T15:24:42Z")

</div>

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.
