我是布朗尼的新手。当我跟着视频https://www.youtube.com/watch?v=M576WGiDBdQ学习如何使用 Brownie 部署区块链合约时,它给了我一个错误。RPCConnectionError: Able to launch RPC client, but unable to connect.
似乎布朗尼启动ganache-cli
并使用“http://127.0.0.1:8545”作为本地测试区块链网络的URI,但不知何故它没有连接到ganache-cli核心,但我尝试ganache-cli
单独启动,一切正常。我将 Brownie 与代理一起使用,但即使我关闭代理,它仍然无法连接到ganache-cli
. 以下是错误代码。
(base) D:\OneDrive\xjtu\Labs\blockchain\solidity\bronie_simple_storage>brownie run scripts/deploy.py
INFO: Could not find files for the given pattern(s).
Brownie v1.17.2 - Python development framework for Ethereum
BronieSimpleStorageProject is the active project.
Launching 'ganache-cli.cmd --port 8545 --gasLimit 12000000 --accounts 10 --hardfork istanbul --mnemonic brownie'...
Terminating local RPC client...
File "c:\users\zheng\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\_cli\__main__.py", line 64, in main
importlib.import_module(f"brownie._cli.{cmd}").main()
File "c:\users\zheng\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\_cli\run.py", line 44, in main
network.connect(CONFIG.argv["network"])
File "c:\users\zheng\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\main.py", line 50, in connect
rpc.launch(active["cmd"], **active["cmd_settings"])
File "c:\users\zheng\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\rpc\__init__.py", line 95, in launch
raise RPCConnectionError(cmd, self.process, uri)
RPCConnectionError: Able to launch RPC client, but unable to connect.
Command: ganache-cli
URI: http://127.0.0.1:8545
Exit Code: 15
BronieSimpleStorageProject is the active project.