Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'language' when allow_revert=True again #1554

Open
u39kun opened this issue Jun 5, 2022 · 1 comment
Open

KeyError: 'language' when allow_revert=True again #1554

u39kun opened this issue Jun 5, 2022 · 1 comment

Comments

@u39kun
Copy link

u39kun commented Jun 5, 2022

Environment information

  • brownie Version: 1.19.0
  • ganache-cli Version: 7.2.0
  • solc Version: 0.8.14
  • Python Version: 3.8.9
  • OS: osx + linux

What was wrong?

Very similar to #1139

  File "brownie/_cli/run.py", line 51, in main
    return_value, frame = run(
  File "brownie/project/scripts.py", line 110, in run
    return_value = f_locals[method_name](*args, **kwargs)
  File "./scripts/scratch.py", line 51, in main
    tx = finder.withdrawEthWithRevertMessage(
  File "brownie/network/contract.py", line 1861, in __call__
    return self.transact(*args)
  File "brownie/network/contract.py", line 1734, in transact
    return tx["from"].transfer(
  File "brownie/network/account.py", line 682, in transfer
    receipt._raise_if_reverted(exc)
  File "brownie/network/transaction.py", line 441, in _raise_if_reverted
    marker = "//" if contract._build["language"] == "Solidity" else "#"
KeyError: 'language'

How can it be fixed?

Replace all instances of contract._build["language"] with contract._build.get("language") in transaction.py.
I've patched my local copy to get around this issue.

@u39kun
Copy link
Author

u39kun commented Jun 5, 2022

See PR #1555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant