From 417836c3d990eeb5f35ad882fe54ab06dd3df3a0 Mon Sep 17 00:00:00 2001 From: barrierye Date: Fri, 12 Jun 2020 21:11:32 +0800 Subject: [PATCH] bug fix --- python/paddle_serving_server/pyserver.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/paddle_serving_server/pyserver.py b/python/paddle_serving_server/pyserver.py index 8dda9a68..dfe6d73d 100644 --- a/python/paddle_serving_server/pyserver.py +++ b/python/paddle_serving_server/pyserver.py @@ -87,6 +87,7 @@ class ChannelDataType(enum.Enum): CHANNEL_PBDATA = 0 CHANNEL_FUTURE = 1 CHANNEL_NPDATA = 2 + ERROR = 3 class ChannelData(object): @@ -116,6 +117,7 @@ class ChannelData(object): pbdata.ecode = ecode pbdata.id = data_id pbdata.error_info = error_info + datatype = ChannelDataType.ERROR.value else: if datatype == ChannelDataType.CHANNEL_FUTURE.value: if pbdata is None: @@ -136,7 +138,7 @@ class ChannelData(object): pbdata.error_info = error_info logging.error(pbdata.error_info) else: - for name, value in postped_data.items(): + for name, value in npdata.items(): inst = channel_pb2.Inst() inst.data = value.tobytes() inst.name = name -- GitLab