0

当我键入“brownie compile”时,它不起作用,并且出现此错误。有人知道为什么吗?

  File "c:\users\sircr\appdata\local\programs\python\python39\lib\site-packages\brownie\_cli\__main__.py", line 64, in main
    importlib.import_module(f"brownie._cli.{cmd}").main()
  File "c:\users\sircr\appdata\local\programs\python\python39\lib\site-packages\brownie\_cli\compile.py", line 50, in main
    proj = project.load()
  File "c:\users\sircr\appdata\local\programs\python\python39\lib\site-packages\brownie\project\main.py", line 750, in load
    return Project(name, project_path)
  File "c:\users\sircr\appdata\local\programs\python\python39\lib\site-packages\brownie\project\main.py", line 182, in __init__
    self.load()
  File "c:\users\sircr\appdata\local\programs\python\python39\lib\site-packages\brownie\project\main.py", line 237, in load
    self._compile(changed, self._compiler_config, False)
  File "c:\users\sircr\appdata\local\programs\python\python39\lib\site-packages\brownie\project\main.py", line 89, in _compile
    _install_dependencies(self._path)
  File "c:\users\sircr\appdata\local\programs\python\python39\lib\site-packages\brownie\project\main.py", line 756, in _install_dependencies
    install_package(package_id)
  File "c:\users\sircr\appdata\local\programs\python\python39\lib\site-packages\brownie\project\main.py", line 778, in install_package
    return _install_from_github(package_id)
  File "c:\users\sircr\appdata\local\programs\python\python39\lib\site-packages\brownie\project\main.py", line 851, in _install_from_github
    raise ConnectionError(msg)
ConnectionError: Status 404 when getting package versions from Github: 'Not Found'
4

2 回答 2

0

看来您没有编写正确的链接,而且,当您粘贴 V3 聚合器的导入检查版本时,我将 V0.8 更改为 V0.6 以与 Solidity 版本 0.6.6 正确

例如:对我来说,我只是在合同中添加了解决问题的方法。smartcontractkit/chainlink-brownie-contracts@1.1.1 可以,而不是 smartcontractkit/chainlink-brownie-contract@1.1.1 我一开始写的(错误地)

经过这些更改后,它运行良好

于 2022-01-06T22:19:22.530 回答
0

检查您的配置文件,它主要是由于拼写错误而导致错误。在我的文件中,我在连字符(-)之后写了依赖项,没有任何空格,当我修复它时,合同被正确编译

解决错误之前的brownie-config.yaml 文件

dependencies:
  -smartcontractkit/chainlink-brownie-contracts@1.1.1

解决错误的brownie-config.yaml 文件

dependencies:
  - smartcontractkit/chainlink-brownie-contracts@1.1.1

每当使用连字符 (-) 时都这样做

于 2022-03-04T06:42:33.017 回答