Closed moldovan-clarifai closed 2 years ago
from clarifai_grpc.channel.clarifai_channel import ClarifaiChannel from clarifai_grpc.grpc.api import service_pb2_grpc, service_pb2, resources_pb2 stub = service_pb2_grpc.V2Stub(ClarifaiChannel.get_json_channel()) if __name__ == '__main__': YOUR_CLARIFAI_API_KEY = 'KEY' auth_metadata = (('authorization', f'Key {YOUR_CLARIFAI_API_KEY}'),) resp = stub.PostModelOutputs(service_pb2.PostModelOutputsRequest( user_app_id=resources_pb2.UserAppIDSet( user_id='user-id', app_id='app-id', ), model_id='model-id', inputs=[resources_pb2.Input( id="input-id" )] ), metadata=auth_metadata) print(resp)
KeyError: 'data'
data
id
Steps to Replicate
Expected
Actual
KeyError: 'data'
becase input has nodata
filed, it only hasid
field