Web3.py: Can not parse event with tuple arguments

Created on 24 Apr 2020  路  8Comments  路  Source: ethereum/web3.py

  • Version: 5.7.0
  • Python: 3.7.6
  • OS: osx
  • pip freeze output
  • Node: Geth/v1.9.13-stable/darwin-amd64/go1.14.2 (IPCProvider)


pip freeze output

absl-py==0.9.0
appnope==0.1.0
asn1crypto==0.24.0
astor==0.8.1
astroid==2.0.4
atomicwrites==1.2.1
attrdict==2.0.1
attrs==18.2.0
autopep8==1.4.4
backcall==0.1.0
base58==2.0.0
beautifulsoup4==4.6.3
bigfloat==0.4.0
bleach==2.1.3
bs4==0.0.1
cachetools==4.0.0
certifi==2018.10.15
cffi==1.11.5
chardet==3.0.4
coincurve==9.0.0
coloredlogs==10.0
cryptography==2.3.1
cryptohash==1.0.4
crytic-compile==0.1.2
cycler==0.10.0
cytoolz==0.10.1
decorator==4.3.0
Deprecated==1.2.6
ecdsa==0.13
entrypoints==0.2.3
eth-abi==2.1.1
eth-account==0.4.0
eth-hash==0.2.0
eth-keyfile==0.5.1
eth-keys==0.2.4
eth-rlp==0.1.2
eth-typing==2.2.1
eth-utils==1.8.4
ethereum==2.3.2
future==0.16.0
gast==0.2.2
get==2018.11.19
gevent==1.4.0
git-filter-repo==2.26.0
google-auth==1.11.3
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
greenlet==0.4.15
grpcio==1.27.2
h5py==2.10.0
hexbytes==0.2.0
html5lib==1.0.1
humanfriendly==4.17
idna==2.7
importlib-metadata==1.5.0
imutils==0.5.3
interval3==2.0.0
ipfshttpclient==0.4.13.2
ipykernel==4.8.2
ipysankeywidget==0.2.5
ipython==6.5.0
ipython-genutils==0.2.0
ipywidgets==7.4.0
isort==4.3.4
jedi==0.12.1
Jinja2==2.10
json5==0.9.2
jsonschema==3.2.0
jupyter-client==5.2.3
jupyter-console==5.2.0
jupyter-contrib-core==0.3.3
jupyter-contrib-nbextensions==0.5.1
jupyter-core==4.4.0
jupyter-highlight-selected-word==0.2.0
jupyter-latex-envs==1.4.6
jupyter-nbextensions-configurator==0.4.1
jupyterlab==2.0.1
jupyterlab-server==1.0.7
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
kiwisolver==1.0.1
lazy-object-proxy==1.3.1
lru-dict==1.1.6
lxml==4.3.4
Markdown==3.2.1
MarkupSafe==1.0
matplotlib==2.2.2
mccabe==0.6.1
mercurial==5.2.2
mistune==0.8.3
more-itertools==4.3.0
mpmath==1.1.0
multiaddr==0.0.9
nbconvert==5.3.1
nbformat==4.4.0
netaddr==0.7.19
networkx==2.2
notebook==5.6.0
numpy==1.18.2
oauthlib==3.1.0
opt-einsum==3.2.0
pandas==0.24.2
pandas-datareader==0.7.0
pandocfilters==1.4.2
parsimonious==0.8.1
parso==0.3.1
patsy==0.5.1
pbkdf2==1.3
pexpect==4.6.0
pickleshare==0.7.4
Pillow==7.0.0
pluggy==0.8.0
post==2018.11.20
prettytable==0.7.2
prometheus-client==0.3.1
prompt-toolkit==1.0.15
protobuf==3.11.2
ptyprocess==0.6.0
public==2018.11.20
py==1.7.0
py-ecc==1.1.1
py-solc==3.2.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle==2.5.0
pycparser==2.18
pycrypto==2.6.1
pycryptodome==3.6.6
pydot==1.4.1
pyethash==0.1.27
pyevmasm==0.1.1
PyGithub==1.43.8
Pygments==2.2.0
PyJWT==1.7.1
pykalman==0.9.5
pykeccak==0.2.1
pylint==2.1.1
pyOpenSSL==18.0.0
pypandoc==1.4
pyparsing==2.2.0
pyrsistent==0.15.7
pysha3==1.0.2
pytesseract==0.3.1
pytest==4.0.0
python-dateutil==2.7.3
python-engineio==3.4.2
python-socketio==3.1.2
pytz==2018.5
PyYAML==3.13
pyzmq==17.1.2
qtconsole==4.4.0
query-string==2018.11.20
repoze.lru==0.7
request==2018.11.20
requests==2.23.0
requests-oauthlib==1.3.0
rlp==1.0.3
rsa==4.0
scipy==1.4.1
scrypt==0.8.6
semantic-version==2.6.0
Send2Trash==1.5.0
simplegeneric==0.8.1
six==1.14.0
slither-analyzer==0.6.4
statsmodels==0.10.0
sympy==1.3
TBB==0.1
tensorboard==2.1.1
tensorflow==2.1.0
tensorflow-estimator==2.1.0
termcolor==1.1.0
terminado==0.8.1
testpath==0.3.1
toolz==0.9.0
tornado==5.1
traitlets==4.3.2
typing-extensions==3.7.4.2
urllib3==1.24.1
varint==1.0.2
virtualenv==16.0.0
wcwidth==0.1.7
web3==5.7.0
webencodings==0.5.1
websockets==8.1
Werkzeug==1.0.0
widgetsnbextension==3.4.0
wrapt==1.12.1
yahoo-finance-pandas==1.0.3
z3-solver==4.5.1.0.post2
zipp==3.1.0

What was wrong?

I'm unable to parse this event from this contract. Getting the following error:

order = w3.eth.contract(address='0xCd81398895bEa7AD9EFF273aeFFc41A9d83B4dAD', abi=getAbi('0xCd81398895bEa7AD9EFF273aeFFc41A9d83B4dAD'))
event_filter = order.events.LogCanonicalOrderFilled.createFilter(fromBlock=9936332)
event_filter.get_all_entries()
/usr/local/lib/python3.7/site-packages/eth_abi/registry.py in find(self, type_str)
     89             raise NoEntriesFound("No matching entries for '{}' in {}".format(
     90                 type_str,
---> 91                 self._name,
     92             ))
     93 

NoEntriesFound: No matching entries for 'tuple' in decoder registry

How can it be fixed?

Could be related to #829.

All 8 comments

Can you provide the output from pip freeze so we can see versions of your dependencies.

pip freeze (Sorry for the mess, this is my Jupyter Notebook which doesn't run in a virtualenv)


Output

absl-py==0.9.0
appnope==0.1.0
asn1crypto==0.24.0
astor==0.8.1
astroid==2.0.4
atomicwrites==1.2.1
attrdict==2.0.1
attrs==18.2.0
autopep8==1.4.4
backcall==0.1.0
base58==2.0.0
beautifulsoup4==4.6.3
bigfloat==0.4.0
bleach==2.1.3
bs4==0.0.1
cachetools==4.0.0
certifi==2018.10.15
cffi==1.11.5
chardet==3.0.4
coincurve==9.0.0
coloredlogs==10.0
cryptography==2.3.1
cryptohash==1.0.4
crytic-compile==0.1.2
cycler==0.10.0
cytoolz==0.10.1
decorator==4.3.0
Deprecated==1.2.6
ecdsa==0.13
entrypoints==0.2.3
eth-abi==2.1.1
eth-account==0.4.0
eth-hash==0.2.0
eth-keyfile==0.5.1
eth-keys==0.2.4
eth-rlp==0.1.2
eth-typing==2.2.1
eth-utils==1.8.4
ethereum==2.3.2
future==0.16.0
gast==0.2.2
get==2018.11.19
gevent==1.4.0
git-filter-repo==2.26.0
google-auth==1.11.3
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
greenlet==0.4.15
grpcio==1.27.2
h5py==2.10.0
hexbytes==0.2.0
html5lib==1.0.1
humanfriendly==4.17
idna==2.7
importlib-metadata==1.5.0
imutils==0.5.3
interval3==2.0.0
ipfshttpclient==0.4.13.2
ipykernel==4.8.2
ipysankeywidget==0.2.5
ipython==6.5.0
ipython-genutils==0.2.0
ipywidgets==7.4.0
isort==4.3.4
jedi==0.12.1
Jinja2==2.10
json5==0.9.2
jsonschema==3.2.0
jupyter-client==5.2.3
jupyter-console==5.2.0
jupyter-contrib-core==0.3.3
jupyter-contrib-nbextensions==0.5.1
jupyter-core==4.4.0
jupyter-highlight-selected-word==0.2.0
jupyter-latex-envs==1.4.6
jupyter-nbextensions-configurator==0.4.1
jupyterlab==2.0.1
jupyterlab-server==1.0.7
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
kiwisolver==1.0.1
lazy-object-proxy==1.3.1
lru-dict==1.1.6
lxml==4.3.4
Markdown==3.2.1
MarkupSafe==1.0
matplotlib==2.2.2
mccabe==0.6.1
mercurial==5.2.2
mistune==0.8.3
more-itertools==4.3.0
mpmath==1.1.0
multiaddr==0.0.9
nbconvert==5.3.1
nbformat==4.4.0
netaddr==0.7.19
networkx==2.2
notebook==5.6.0
numpy==1.18.2
oauthlib==3.1.0
opt-einsum==3.2.0
pandas==0.24.2
pandas-datareader==0.7.0
pandocfilters==1.4.2
parsimonious==0.8.1
parso==0.3.1
patsy==0.5.1
pbkdf2==1.3
pexpect==4.6.0
pickleshare==0.7.4
Pillow==7.0.0
pluggy==0.8.0
post==2018.11.20
prettytable==0.7.2
prometheus-client==0.3.1
prompt-toolkit==1.0.15
protobuf==3.11.2
ptyprocess==0.6.0
public==2018.11.20
py==1.7.0
py-ecc==1.1.1
py-solc==3.2.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle==2.5.0
pycparser==2.18
pycrypto==2.6.1
pycryptodome==3.6.6
pydot==1.4.1
pyethash==0.1.27
pyevmasm==0.1.1
PyGithub==1.43.8
Pygments==2.2.0
PyJWT==1.7.1
pykalman==0.9.5
pykeccak==0.2.1
pylint==2.1.1
pyOpenSSL==18.0.0
pypandoc==1.4
pyparsing==2.2.0
pyrsistent==0.15.7
pysha3==1.0.2
pytesseract==0.3.1
pytest==4.0.0
python-dateutil==2.7.3
python-engineio==3.4.2
python-socketio==3.1.2
pytz==2018.5
PyYAML==3.13
pyzmq==17.1.2
qtconsole==4.4.0
query-string==2018.11.20
repoze.lru==0.7
request==2018.11.20
requests==2.23.0
requests-oauthlib==1.3.0
rlp==1.0.3
rsa==4.0
scipy==1.4.1
scrypt==0.8.6
semantic-version==2.6.0
Send2Trash==1.5.0
simplegeneric==0.8.1
six==1.14.0
slither-analyzer==0.6.4
statsmodels==0.10.0
sympy==1.3
TBB==0.1
tensorboard==2.1.1
tensorflow==2.1.0
tensorflow-estimator==2.1.0
termcolor==1.1.0
terminado==0.8.1
testpath==0.3.1
toolz==0.9.0
tornado==5.1
traitlets==4.3.2
typing-extensions==3.7.4.2
urllib3==1.24.1
varint==1.0.2
virtualenv==16.0.0
wcwidth==0.1.7
web3==5.7.0
webencodings==0.5.1
websockets==8.1
Werkzeug==1.0.0
widgetsnbextension==3.4.0
wrapt==1.12.1
yahoo-finance-pandas==1.0.3
z3-solver==4.5.1.0.post2
zipp==3.1.0

IIRC, someone brought this up in chat recently, too. My first guess was an old version, but like @Recmo, they had recent-enough libraries.

1235 is what added tuple support generally, so really #829 should have closed. (Though clearly there's a new, specific problem here)

I do notice that this PR only adds tests for tuples at method arguments and return values. I don't see any tests for tuple-typed events. So the first step seems like adding a test of parsing an event with a tuple-typed log value.

Presumably that will fail and then we can get this fixed up.

Maybe related to #1569 as well (arrays there, not tuples, but otherwise I guess similar)?

I'm pretty sure this is also the same problem as the one in #1621. I am going to close #1621, but want to leave #1569 open because I'm not sure that's exactly the same problem, even though it does look similar.

Running into this as well. Any good workarounds?

So can not support ABIEncoderV2 to enable structure-type parameter in event?

I have the same issue when i try to parse an event wich takes a struct as parameters

Was this page helpful?
0 / 5 - 0 ratings