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

Call to AsyncWeb3.solidity_keccak raises TypeError: 'cytoolz.functoolz.curry' object is not iterable #3006

Closed
pjwerneck opened this issue Jun 23, 2023 · 1 comment · Fixed by #3034

Comments

@pjwerneck
Copy link

pjwerneck commented Jun 23, 2023

  • Version: 6.5.0
  • Python: 3.10.12
  • OS: osx/linux/win
  • pip freeze output
aiohttp==3.8.4
aiosignal==1.3.1
async-timeout==4.0.2
attrs==23.1.0
bitarray==2.7.5
certifi==2023.5.7
charset-normalizer==3.1.0
cytoolz==0.12.1
eth-abi==4.1.0
eth-account==0.9.0
eth-hash==0.5.2
eth-keyfile==0.6.1
eth-keys==0.4.0
eth-rlp==0.3.0
eth-typing==3.4.0
eth-utils==2.1.1
frozenlist==1.3.3
hexbytes==0.3.1
idna==3.4
jsonschema==4.17.3
lru-dict==1.2.0
multidict==6.0.4
parsimonious==0.9.0
protobuf==4.23.3
pycryptodome==3.18.0
pyrsistent==0.19.3
regex==2023.6.3
requests==2.31.0
rlp==3.0.0
toolz==0.12.0
urllib3==2.0.3
web3==6.5.0
websockets==11.0.3
yarl==1.9.2

What was wrong?

Upgraded from 6.0.0 to 6.5.0. Web3.solidity_keccak works as expected, but AsyncWeb3.solidity_keccak raises an exception.

>>> from web3 import Web3, AsyncWeb3
>>> Web3.solidity_keccak(("address", "uint256"), ("0xC378c4C85B04c6598B498bf107E5872D3d4A1F2e", 123))
HexBytes('0x8f984d5a8d254b1ac6d2c0dcc8ca187254885a6347125c96dabaaaf3ecca3ec7')
>>> AsyncWeb3.solidity_keccak(("address", "uint256"), ("0xC378c4C85B04c6598B498bf107E5872D3d4A1F2e", 123))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pedro/tmp/.venv/lib/python3.10/site-packages/eth_utils/decorators.py", line 20, in _wrapper
    return self.method(objtype, *args, **kwargs)
  File "/home/pedro/tmp/.venv/lib/python3.10/site-packages/web3/main.py", line 316, in solidity_keccak
    for abi_type, value in zip(abi_types, normalized_values)
TypeError: 'cytoolz.functoolz.curry' object is not iterable

How can it be fixed?

?

@pjwerneck pjwerneck changed the title Call to AsyncWeb3.solidity_keccak raises in TypeError: 'cytoolz.functoolz.curry' object is not iterable Call to AsyncWeb3.solidity_keccak raises TypeError: 'cytoolz.functoolz.curry' object is not iterable Jun 24, 2023
@kclowes
Copy link
Collaborator

kclowes commented Jul 12, 2023

Thank you for raising this! I just PR'ed #3034 which should fix it.

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

Successfully merging a pull request may close this issue.

2 participants