Error
#1404
Replies: 1 comment 5 replies
-
Hello @samzyibia |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
OS: windows 10 pro
I am new to solidity and was following the tutorial video to install the solidity compiler. I successfully installed the solidity compiler.
However, when I tried doing the web3.py_simple_storage example I encounter this error:
INFO: Could not find files for the given pattern(s).
Traceback (most recent call last):
File "C:\Users\SAMUEL\AppData\Local\Programs\Python\Python310\lib\site-packages\solcx\wrapper.py", line 19, in _get_solc_version
match = next(re.finditer(VERSION_REGEX, stdout_data))
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\SAMUEL\demos\web3_py_simple_storage\deploy.py", line 11, in
compiled_sol = compile_standard(
File "C:\Users\SAMUEL\AppData\Local\Programs\Python\Python310\lib\site-packages\solcx\main.py", line 373, in compile_standard
stdoutdata, stderrdata, command, proc = wrapper.solc_wrapper(
File "C:\Users\SAMUEL\AppData\Local\Programs\Python\Python310\lib\site-packages\solcx\wrapper.py", line 98, in solc_wrapper
solc_version = _get_solc_version(solc_binary)
File "C:\Users\SAMUEL\AppData\Local\Programs\Python\Python310\lib\site-packages\solcx\wrapper.py", line 22, in _get_solc_version
raise SolcError("Could not determine the solc binary version")
solcx.exceptions.SolcError: Could not determine the solc binary version
here is the code:import solc
from solcx import compile_standard, install_solc
install_solc("0.8.0")
with open("./SimpleStorage.sol", "r") as file:
simple_storage_file = file.read()
compiled_sol = compile_standard(
{
"language": "Solidity",
"sources": {"SimpleStorage.sol": {"content": simple_storage_file}},
"settings": {
"outputSelection": {
"": {"": ["abi", "metadata", "evm.bytecode", "evm.sourceMap"]}
}
},
},
solc_version="0.8.0",
)
print( compiled_sol)
Please help
Beta Was this translation helpful? Give feedback.
All reactions