diff --git a/python/paddle_serving_server/__init__.py b/python/paddle_serving_server/__init__.py index f4f3248c8174487b51554f27182c0c0cd9740d25..7db647f97560c1ae78ec4a11ad6f22e3afebebc5 100644 --- a/python/paddle_serving_server/__init__.py +++ b/python/paddle_serving_server/__init__.py @@ -274,7 +274,8 @@ class Server(object): self.model_config_paths[node.name] = path print("You have specified multiple model paths, please ensure " "that the input and output of multiple models are the same.") - workflow_oi_config_path = self.model_config_paths.items()[0][1] + workflow_oi_config_path = list(self.model_config_paths.items())[0][ + 1] else: raise Exception("The type of model_config_paths must be str or " "dict({op: model_path}), not {}.".format( diff --git a/python/paddle_serving_server_gpu/__init__.py b/python/paddle_serving_server_gpu/__init__.py index 5a06bd712a836617047b0cc947956fc5d2213daa..7acc926c7f7fc465da20a7609bc767a5289d2e61 100644 --- a/python/paddle_serving_server_gpu/__init__.py +++ b/python/paddle_serving_server_gpu/__init__.py @@ -320,7 +320,8 @@ class Server(object): self.model_config_paths[node.name] = path print("You have specified multiple model paths, please ensure " "that the input and output of multiple models are the same.") - workflow_oi_config_path = self.model_config_paths.items()[0][1] + workflow_oi_config_path = list(self.model_config_paths.items())[0][ + 1] else: raise Exception("The type of model_config_paths must be str or " "dict({op: model_path}), not {}.".format(