diff --git a/ge/offline/single_op_parser.cc b/ge/offline/single_op_parser.cc index 4e05ff88..13641602 100644 --- a/ge/offline/single_op_parser.cc +++ b/ge/offline/single_op_parser.cc @@ -363,12 +363,12 @@ Status ValidateSingleOpJson() { for (const auto &r : GetJsonTensorVerifyResult()) { if (!r.is_format_valid) { string err_str = "json tensor format invalid.Tensor name is [" + r.tensor_name + "], format is " + r.format; - GE_ERRORLOG_AND_ERRORMSG(PARAM_INVALID, err_str); + GE_ERRORLOG_AND_ERRORMSG(PARAM_INVALID, err_str.c_str()); return PARAM_INVALID; } if (!r.is_dtyep_valid) { string err_str = "json tensor datatype invalid.Tensor name is [" + r.tensor_name + "], datatype is " + r.dtype; - GE_ERRORLOG_AND_ERRORMSG(PARAM_INVALID, err_str); + GE_ERRORLOG_AND_ERRORMSG(PARAM_INVALID, err_str.c_str()); return PARAM_INVALID; } }