【发布时间】:2019-06-16 21:23:40
【问题描述】:
我逐步按照https://hyperledger-fabric.readthedocs.io/en/latest/private_data_tutorial.html 处的说明进行操作,但在调用链码时出现类似“错误:解析瞬态字符串时出错:字符串文字中的无效字符'\n' - 提议响应:”这样的错误。有没有人有同样的问题?你能告诉我如何解决它。非常感谢!
我按照https://hyperledger-fabric.readthedocs.io/en/latest/private_data_tutorial.html 的说明一步步操作,但调用链码时出错
返回是“错误:解析瞬态字符串时出错:字符串文字中的无效字符'\n' - 提案响应:”
我在下面发出调用命令: export MARBLE=$(echo -n "{\"name\":\"marble1\",\"color\":\"blue\",\"size\":35,\"owner\":\"汤姆\",\"价格\":99}" | base64) peer chaincode invoke -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com /msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n marblesp -c '{"Args":["initMarble"]}' --transient "{\"marble\":\"$MARBLE \"}"
export MARBLE=$(echo -n "{\"name\":\"marble1\",\"color\":\"blue\",\"size\":35,\"owner\" :\"tom\",\"price\":99}" | base64) peer chaincode invoke -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com /msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n marblesp -c '{"Args":["initMarble"]}' --transient "{\"marble\":\"$MARBLE \"}"
期望: [chaincodeCmd] chaincodeInvokeOrQuery->INFO 001 链码调用成功。结果:状态:200
实际结果: “错误:解析瞬态字符串时出错:字符串文字中的无效字符 '\n' - 提案响应:”
【问题讨论】: