如何解决关于Hyperledger Fabric Python SDK的问题
运行 Hyperledger Fabric Python SDK 中提供的 Jupyter Notebook教程文件时,我遇到一个问题。当我尝试运行可以安装示例链码的代码时,会发生错误,该链码可以在test/fixtures/chaincode
的{{1}}上的peers
上找到。
它显示错误:未定义循环。但是,当我在org1
之前添加代码时。它还显示错误:RuntimeError:此事件循环已在运行。
我该如何解决这个问题?
解决方法
您所指的python sdk教程看起来像是:https://github.com/hyperledger/fabric-sdk-py/blob/master/Tutorial.ipynb
第一个循环是这个循环:
运行以下代码片段以安装示例链码,该链码可在org1的对等方的test / fixtures / chaincode中找到。
In [ ]:
# This installs the example chaincode on the peers
# Make the client know there is a channel in the network
cli.new_channel('businesschannel')
#The GOPTAH settings is required for only running the example chaincode in the SDK
import os
gopath_bak = os.environ.get('GOPATH','')
gopath = os.path.normpath(os.path.join(
os.path.dirname(os.path.realpath('__file__')),'test/fixtures/chaincode'
))
# The response should be true if succeed
responses = loop.run_until_complete(cli.chaincode_install( <<<<<<<<< Here
requestor=org1_admin,peers=['peer0.org1.example.com','peer1.org1.example.com'],cc_path='github.com/example_cc',cc_name='example_cc',cc_version='v1.0'
))
如果您可以通过评论回复确认其中的某些内容,或者将其包含在上方的帖子中,则可能会帮助您找到答案。我已经阅读了问题,并尝试搜索您所指的信息……而没有您正在谈论的明确示例,那么您将很难获得答复。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。