I received the following error while trying to execute a custom built web3.py

complied_sol = compile_standard(
        "language": "Solidity",
        "sources": {"SimpleStorage.sol": {"content": simple_storage_file}},
        "settings": {
            "outputSelection": {
                "*": {"*": ["abi", "metadata", "evm.bytecode", "evm.sourceMap"]}


Exception has occurred: TypeError
solc_wrapper() got an unexpected keyword argument 'solc_version'

If anyone knows how to fix this. Kindly Help Out. Is this deprecated and is there a new-way or using it? Note: I am using 0.6.0 version of Solidity.

  • Is evm.sourceMap working? What about evm.bytecode.sourceMap?
    – v1bio
    Feb 14, 2022 at 10:51
  • @v1bio How do I know mate? How do I Check It??
    – Ayush
    Feb 14, 2022 at 18:03
  • change the code
    – v1bio
    Feb 14, 2022 at 19:11
  • I did, doesn't seem to fix the error. Even changing the solc version doesn't fix it.
    – Ayush
    Feb 15, 2022 at 2:01

1 Answer 1


Took me a day and some coffee but fixed it. I am not completely sure how I got it working but here is a list of troubleshooting steps I was trying that helped me out.

  • Uninstall py-solc-x via terminal using, pip uninstall py-solc-x
  • Use pip cache purge to remove any redundant packages. (Optional)
  • Recheck the path lib\site-packages\solcx\bin\ in your python installation folder [or your virtual environment]. If there is something inside it. Delete It. (If it doesn't exist, then skip)
  • Reinstall py-solc-x via pip install py-solc-x.
  • Check your Solidity Global Compiler Version in VSCode by hitting Ctrl + Shift + P and set it the one mentioned by you in your install_solc() and solc_version and pragma solidity.
  • [For Virtual Environments Only] Check if you have any conflicting py-solc-x packages on your host python directory via pip freeze.
  • Last but not least, Check If you the correct Python Interpreter selected in the same way by hitting Ctrl + Shift + P in which you decide to work on. This can be helpful if you are on a virtual environment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.