import grpc
import osmosis_protobuf.osmosis.gamm.v1beta1.query_pb2_grpc as query_grpc
import osmosis_protobuf.osmosis.gamm.v1beta1.query_pb2 as query
from google.protobuf.json_format import MessageToJson
c = grpc.insecure_channel('grpc.osmosis.zone:9090')
stub = query_grpc.QueryStub(c)
res: query.QueryPoolResponse = stub.Pool(query.QueryPoolRequest(pool_id=708))
res = MessageToJson(res)
gives ...
except KeyError as e:
> raise TypeError(
'Can not find message descriptor by type_url: {0}'.format(type_url)
) from e
E TypeError: Can not find message descriptor by type_url: /osmosis.gamm.v1beta1.Pool
MessageToDict fails in the same way.
How would I read the nested content of QueryPoolResponse?
cheers
gives ...
MessageToDict
fails in the same way.How would I read the nested content of QueryPoolResponse? cheers
I can do ...