Search code examples
ethereumweb3pybrownie

Brownie Errors when attempting to compile


When I type "brownie compile" it doesn't work and I get this error. Anybody know why?

  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'

Solution

  • check your config file, it mostly gives an error due to typos. in my file i had written the dependency right after the hyphen(-) without any space and when i fixed it the contract was compiled properly

    brownie-config.yaml file before solving the error

    dependencies:
      -smartcontractkit/[email protected]
    

    brownie-config.yaml file after solving the error

    dependencies:
      - smartcontractkit/[email protected]
    

    do the same whenever using an hyphen(-)