0
INFO: Could not find files for the given pattern(s).
Traceback (most recent call last):
  File "C:\Users\jethr\demos\web3_py_simple_storage\deploy.py", line 8, in <module>
    compiled_sol = compile_standard(
  File "C:\Users\jethr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\solcx\main.py", line 394, in compile_standard
    raise SolcError(
solcx.exceptions.SolcError: Only "Solidity" or "Yul" is supported as a language.
> command: `C:\Users\jethr\.solcx\solc-v0.6.0\solc.exe --standard-json`
> return code: `0`
> stdout:
{"errors":[{"component":"general","formattedMessage":"Only \"Solidity\" or \"Yul\" is supported as a language.","message":"Only \"Solidity\" or \"Yul\" is supported as a language.","severity":"error","type":"JSONError"}]}

Here is my code:

from solcx import compile_standard, install_solc with open("./SimpleStorage.sol", "r") as file: Simple_Storage_file = file.read() # Compile Our Solidity 
install_solc("0.6.0") 
compiled_sol = compile_standard( { "language": "solidity", "sources": 
{"SimpleStorage.sol": {"content": Simple_Storage_file}}, "settings": { 
"outputSelection": { "": {"": ["abi", "metadata", "evm.bytecode", 
"evm.sourceMap"]} } }, }, solc_version="0.6.0", ) 
print(compiled_sol) 
5
  • Here is my code below:
    – Jebizness
    Jan 21 at 18:53
  • from solcx import compile_standard, install_solc with open("./SimpleStorage.sol", "r") as file: Simple_Storage_file = file.read() # Compile Our Solidity install_solc("0.6.0") compiled_sol = compile_standard( { "language": "solidity", "sources": {"SimpleStorage.sol": {"content": Simple_Storage_file}}, "settings": { "outputSelection": { "": {"": ["abi", "metadata", "evm.bytecode", "evm.sourceMap"]} } }, }, solc_version="0.6.0", ) print(compiled_sol)
    – Jebizness
    Jan 21 at 18:53
  • I think you have a case error, they say language can only be Solidity or Yul but you are sending solidity
    – Julissa DC
    Jan 21 at 20:00
  • So how can i solve it please? @JulissaDC
    – Jebizness
    Jan 22 at 8:13
  • By using the right word with the right case
    – Julissa DC
    Jan 23 at 15:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.