1

它在我的服务器上运行良好,但是在执行本地 MacOS 时brownie run scripts/price_feed_scripts/01_deploy_price_consumer_v3.py --network development,它显示:

Launching 'ganache-cli --accounts 10 --hardfork istanbul --gasLimit 12000000 --mnemonic brownie --port 8545'...
Terminating local RPC client...
  File "brownie/_cli/__main__.py", line 64, in main
    importlib.import_module(f"brownie._cli.{cmd}").main()
  File "brownie/_cli/run.py", line 43, in main
    network.connect(CONFIG.argv["network"])
  File "brownie/network/main.py", line 50, in connect
    rpc.launch(active["cmd"], **active["cmd_settings"])
  File "brownie/network/rpc/__init__.py", line 97, in launch
    raise RPCConnectionError(cmd, self.process, uri)
  File "brownie/exceptions.py", line 41, in __init__
    f"\n\nCommand: {cmd}\nURI: {uri}\nExit Code: {proc.poll()}"
AttributeError: 'NoneType' object has no attribute 'poll'
4

6 回答 6

0

It is likely that the command is unable to start the ganache instance on its own. You could try to start one manually on a different terminal and then run the command so that it attaches to the already running instance

于 2021-11-10T18:20:02.913 回答
0

我通过添加host=http://127.0.0.1确保它http不是HTTP你的命令来解决同样的问题应该是这样的:

`brownie networks add development mainnet-fork-dev cmd=ganache-cli host=http://127.0.0.1  fork=https://eth-mainnet.alchemyapi.io/v2/DFwObAmnPwS21NdNsSLFkpV4C5YEkthH accounts=10 mnemonic=brownie port=9999`
于 2022-02-20T12:43:22.613 回答
0

对于遇到此问题的其他任何人,请确保您没有使用 指定本地主机https,而是使用http. 我花了很长时间才看到那个小错字!

于 2022-01-07T22:22:28.283 回答
0

我通过删除像'export http_proxy=http://127.0.0.1:1087'这样的终端代理配置解决了这个问题,这些配置将代理你的终端http请求。不要忘记重启你的macos

于 2022-03-02T06:12:42.020 回答
0

有同样的问题,通常我连接到 VPN 并且一切正常。今天我把它关掉了,又忘了再打开它。然后我遇到了这个问题。经过一番调查,我想到了 VPN,然后我就去了,重新打开后,一切正常(1.1.1.1)

于 2021-10-08T02:08:26.220 回答
0

问题可能出在您为创建“开发”网络而运行的命令中。

brownie networks add development mainnet-fork cmd=ganache-cli host=https://eth-mainnet.alchemyapi.io/XXX accounts=10 mnemonic=brownie port=8545

这是使用错误的主机并且缺少分叉。该命令应该是

brownie networks add development mainnet-fork cmd=ganache-cli host=http://127.0.0.1 fork=https://eth-mainnet.alchemyapi.io/XXX accounts=10 mnemonic=brownie port=8545
于 2021-10-18T11:56:24.960 回答