如何在hyperledger结构中使用链代码访问python文件?

时间:2018-06-16 03:14:43

标签: hyperledger-fabric hyperledger

我试图通过此函数使用chaincode运行python脚本:

    cmd := exec.Command("python", "-c" ,"from land import *;print a.validate_proof(a.get_proof(1),'36e0fd847d927d68475f32a94efff30812ee3ce87c7752973f4dd7476aa2e97e','b8b1f39aa2e3fc2dde37f3df04e829f514fb98369b522bfb35c663befa896766')")
    output, err := cmd.CombinedOutput()
    if err != nil {
        l := fmt.Sprint(err) + ": " + string(output)
        return shim.Error(l)
    } else {
        return shim.Success([]byte(string(output)))
    }

但是在尝试调用频道上的链代码时出现以下错误:

chaincode error (status: 500, message: exec: "python": executable file not found in $PATH:

0 个答案:

没有答案