Camunda 8 Python client

Hi

I tried the camunda community python client, from the repo (camunda-8-code-studio/src/PythonCloudWorker at main · camunda-community-hub/camunda-8-code-studio · GitHub). I have set up caumnda 8 saas account to run my tasks from the repo.

I 'm getting error when i try to run the python file, posting the error. Any suggestions appriciated.

communda_connect.py:59: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
E0118 00:29:19.302897000 6259650560 hpack_parser.cc:1218]              Error parsing metadata: error=invalid value key=content-type value=text/plain; charset=utf-8
E0118 00:29:19.307140000 6259650560 hpack_parser.cc:1218]              Error parsing metadata: error=invalid value key=content-type value=text/plain; charset=utf-8
E0118 00:29:19.310754000 6259650560 hpack_parser.cc:1218]              Error parsing metadata: error=invalid value key=content-type value=text/plain; charset=utf-8
Traceback (most recent call last):

env/lib/python3.10/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.UNIMPLEMENTED
        details = "Received http2 header with status: 404"
        debug_error_string = "UNKNOWN:Error received from peer ipv4:32.12.17.224:443 {created_time:"2023-01-18T00:29:19.304994+05:30", grpc_status:12, grpc_message:"Received http2 header with status: 404"}"
>

During handling of the above exception, another exception occurred:

env/lib/python3.10/site-packages/pyzeebe/grpc_internals/zeebe_adapter_base.py", line 33, in _handle_grpc_error
    raise pyzeebe_error
pyzeebe.errors.zeebe_errors.UnkownGrpcStatusCodeError

problem was i had not passed the region parameter which was defaulting to bru-2.


camunda_region = os.environ.get('CAMUNDA_CLUSTER_REGION')

channel = create_camunda_cloud_channel(client_id=zeebe_client_id, client_secret=zeebe_client_secret, cluster_id=camundacloud_cluster_id,region=camunda_region)
3 Likes

Good to know that you found the issue @cri11