如何解决chaincode中的“语法错误:意外的垫片,期望逗号或”?

I have the chaincode, which should encrypt data and put to ledger and do query.

I have updated fabric binaries, but in other fabric samples chaincodes this line is the same and do not have any errors.

func (s *SmartContract) queryPatient(APIstub shim.ChaincodeStubInterface, args []string) sc.Response { 
     if len(args) != 1 {
         return shim.Error("Incorrect number of arguments. Expecting 1")
     }

    patientAsBytes, err := fc.Decrypter(APIstub, args[0])
    if err != nil {
        return shim.Error(err.Error())
    }

     return shim.Success(patientAsBytes)
 }

Error is directing to the queryPatient(APIstub shim.ChaincodeStubInterface, args []string) sc.Response { .

Don`t know whats in sc.Response but in all the cases you were returning shim.Error() type. As per terminology stub i think you were using gRPC, it should return response and an error.