diff --git a/python/paddle_serving_server/web_service.py b/python/paddle_serving_server/web_service.py index 47c39e64708d3e7871cf160efbd3982c35c71d54..d9b9e3f1b1dcfa9502096d0eab4e3be61d2bbaa6 100755 --- a/python/paddle_serving_server/web_service.py +++ b/python/paddle_serving_server/web_service.py @@ -88,7 +88,7 @@ class WebService(object): result = self.postprocess( feed=request.json["feed"], fetch=fetch, fetch_map=fetch_map) result = {"result": result} - except ValueError, err: + except ValueError as err: result = {"result": err} return result diff --git a/python/paddle_serving_server_gpu/web_service.py b/python/paddle_serving_server_gpu/web_service.py index 886deb769d9aa7fa581cb42087c106e67c71e31b..fecc61ffa1f8637fb214cc748fb14c7ce30731ab 100644 --- a/python/paddle_serving_server_gpu/web_service.py +++ b/python/paddle_serving_server_gpu/web_service.py @@ -133,7 +133,7 @@ class WebService(object): result = self.postprocess( feed=request.json["feed"], fetch=fetch, fetch_map=fetch_map) result = {"result": result} - except ValueError, err: + except ValueError as err: result = {"result": err} return result