当我输入"brownie compile"它不工作,我得到这个错误。有人知道为什么吗?
File "c:userssircrappdatalocalprogramspythonpython39libsite-packagesbrownie_cli__main__.py", line 64, in main
importlib.import_module(f"brownie._cli.{cmd}").main()
File "c:userssircrappdatalocalprogramspythonpython39libsite-packagesbrownie_clicompile.py", line 50, in main
proj = project.load()
File "c:userssircrappdatalocalprogramspythonpython39libsite-packagesbrownieprojectmain.py", line 750, in load
return Project(name, project_path)
File "c:userssircrappdatalocalprogramspythonpython39libsite-packagesbrownieprojectmain.py", line 182, in __init__
self.load()
File "c:userssircrappdatalocalprogramspythonpython39libsite-packagesbrownieprojectmain.py", line 237, in load
self._compile(changed, self._compiler_config, False)
File "c:userssircrappdatalocalprogramspythonpython39libsite-packagesbrownieprojectmain.py", line 89, in _compile
_install_dependencies(self._path)
File "c:userssircrappdatalocalprogramspythonpython39libsite-packagesbrownieprojectmain.py", line 756, in _install_dependencies
install_package(package_id)
File "c:userssircrappdatalocalprogramspythonpython39libsite-packagesbrownieprojectmain.py", line 778, in install_package
return _install_from_github(package_id)
File "c:userssircrappdatalocalprogramspythonpython39libsite-packagesbrownieprojectmain.py", line 851, in _install_from_github
raise ConnectionError(msg)
ConnectionError: Status 404 when getting package versions from Github: 'Not Found'
检查你的配置文件,它大多给出一个错误,由于打字错误。在我的文件中,我在连字符(-)之后编写了依赖关系,没有任何空格,当我修复它时,合同被正确编译
brownie-config。在解决错误
之前的Yaml文件dependencies:
-smartcontractkit/chainlink-brownie-contracts@1.1.1
brownie-config。
后的Yaml文件解决错误dependencies:
- smartcontractkit/chainlink-brownie-contracts@1.1.1
在使用连字符(-)
时执行同样的操作似乎你没有写正确的链接,而且,当你粘贴V3聚合器的导入检查版本时,我将V0.8更改为V0.6,以正确使用solid版本0.6.6
对于我来说,我只是在合同中增加了一个s来解决这个问题。smartcontractkit/chainlink-brownie-contracts@1.1.1是ok的,而不是smartcontractkit/chainlink-brownie-contract@1.1.1我一开始写的(错误)经过这些修改后,它工作得很好