Getting an error when working with Brownie

53 Views Asked by At

When I want to run the reputation .sol file and use brownie compile, I get the following error (using a PowerShell window).

cd C:\Users\s\Documents\project\reputationproject
brownie compile

Output:

INFO: Could not find files for the given pattern(s).
Brownie v1.19.3 - Python development framework for Ethereum

New compatible solc version available: 0.8.7
  File "C:\Users\s\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\s\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\_cli\compile.py", line 50, in main
    proj = project.load()
  File "C:\Users\s\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\project\main.py", line 780, in load
    return Project(name, project_path)
  File "C:\Users\s\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\project\main.py", line 188, in __init__
    self.load()
  File "C:\Users\s\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\project\main.py", line 257, in load
    self._compile(changed, self._compiler_config, False)
  File "C:\Users\s\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\project\main.py", line 100, in _compile
    build_json = compiler.compile_and_format(
  File "C:\Users\s\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\project\compiler\__init__.py", line 121, in compile_and_format
    set_solc_version(version)
  File "C:\Users\s\AppData\Local\Programs\Python\Python39\lib\site-packages\brownie\project\compiler\solidity.py", line 99, in set_solc_version
    return str(solcx.get_solc_version())
  File "C:\Users\s\AppData\Local\Programs\Python\Python39\lib\site-packages\solcx\main.py", line 27, in get_solc_version
    return wrapper._get_solc_version(solc_binary, with_commit_hash)
  File "C:\Users\s\AppData\Local\Programs\Python\Python39\lib\site-packages\solcx\wrapper.py", line 22, in _get_solc_version
    raise SolcError("Could not determine the solc binary version")
SolcError: Could not determine the solc binary version
> command: ``
> return code: `None`
> stdout:
None
> stderr:
None

How can I fix it?

1

There are 1 best solutions below

0
Saikat Karmakar On
  • Have you checked the Solidity compiler version?
  • install pip3 install solc-select
  • solc-select install <version mentioned in the Solidity files>
  • solc-select use <the same version>