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

web3.eth.get_transaction raises an exception when the transaction is not found but the documentation says otherwise #2617

Closed
hashtonmartyn opened this issue Aug 23, 2022 · 1 comment · Fixed by #2619

Comments

@hashtonmartyn
Copy link

  • Version: 5.30.0
  • Python: 3.9
  • OS: linux
  • pip freeze output
aiohttp @ file:///home/henrya/.cache/pypoetry/artifacts/c3/d1/97/85daa5493c9bf3eb25c509bc3eb629985f82b89336bfcb5adcb76b78fe/aiohttp-3.8.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
aiosignal @ file:///home/henrya/.cache/pypoetry/artifacts/d3/d7/92/f7aa28b137b4b00e62270f58330cedde299917a71a3c00ee64913aa3c2/aiosignal-1.2.0-py3-none-any.whl
async-timeout @ file:///home/henrya/.cache/pypoetry/artifacts/62/ff/30/bd0ec891880d93bf40cf6e7c53ab08dd9eb6af45fa532c030731e6eed0/async_timeout-4.0.2-py3-none-any.whl
attrs @ file:///home/henrya/.cache/pypoetry/artifacts/62/f0/59/eeccc31c495183d61944cc7da7adc89fecd84f334e12642effe639ec20/attrs-22.1.0-py2.py3-none-any.whl
backoff @ file:///home/henrya/.cache/pypoetry/artifacts/b6/4f/31/6b33777819afe6e4b26fda5297c3a8dcbeb295dd161774a6959495b764/backoff-2.1.2-py3-none-any.whl
base58 @ file:///home/henrya/.cache/pypoetry/artifacts/2e/53/33/a15f42f485704caf86395e9701bb3440206ec9bffc062d7a597f43518e/base58-2.1.1-py3-none-any.whl
bitarray @ file:///home/henrya/.cache/pypoetry/artifacts/69/f4/02/32eb36b773613e2b9eaf151b773cf033bdc0f35b08b1eac1df0992c908/bitarray-2.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
certifi @ file:///home/henrya/.cache/pypoetry/artifacts/b0/0d/df/4aa04d9b421fc5f1438b55d4b37516d21ef0ba40158bf7f9dfb28122ca/certifi-2022.6.15-py3-none-any.whl
charset-normalizer @ file:///home/henrya/.cache/pypoetry/artifacts/3e/99/e2/360c4ab5408a60c2f59e1f90b0e788ec410f1ebc0921724075288f9af9/charset_normalizer-2.1.1-py3-none-any.whl
common-object-models @ file:///home/henrya/.cache/pypoetry/virtualenvs/ronin-data-importer-FU8BxRAm-py3.9/src/common-object-models
cytoolz @ file:///home/henrya/.cache/pypoetry/artifacts/88/de/bb/bd9536b6677158a256337b41d3220405883f48b73f820ce6c1f7a3bdc6/cytoolz-0.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
eth-abi @ file:///home/henrya/.cache/pypoetry/artifacts/df/67/ee/68e7032dcfcb51823636752453164765cf83a94b191191219913424c0e/eth_abi-2.2.0-py3-none-any.whl
eth-account @ file:///home/henrya/.cache/pypoetry/artifacts/e9/ac/2c/449609c0f5c758e1415cac1c84e1735ef5933d4a96eae01ed82b4ebc0e/eth_account-0.5.9-py3-none-any.whl
eth-hash @ file:///home/henrya/.cache/pypoetry/artifacts/46/07/21/7291e6f97bf96d7e5d26fcabbb36912f4d2c876d1cda6ac92ace5625c0/eth_hash-0.3.3-py3-none-any.whl
eth-keyfile @ file:///home/henrya/.cache/pypoetry/artifacts/44/63/a8/375cdecd35ac75d543c28b8182a2ea352259bcced782ed9457f006322e/eth_keyfile-0.5.1-py3-none-any.whl
eth-keys @ file:///home/henrya/.cache/pypoetry/artifacts/b6/4f/ce/b3584399b26bc3fa4065890153152adfd8161a09732097f881f704a2ab/eth_keys-0.3.4-py3-none-any.whl
eth-rlp @ file:///home/henrya/.cache/pypoetry/artifacts/91/f6/b8/1624474cbc705f1727c3b82a94dee538a7f84cc1dd63442c505e28fb67/eth_rlp-0.2.1-py3-none-any.whl
eth-typing @ file:///home/henrya/.cache/pypoetry/artifacts/35/27/a8/e6380a48016242722ee09b70eadee4dfdb3b1ff4c54d6bfa30bd69d809/eth_typing-2.3.0-py3-none-any.whl
eth-utils @ file:///home/henrya/.cache/pypoetry/artifacts/43/78/84/a16aeba200c9316e51565edc8dcd130fc7ac5efde45455d66b1643918b/eth_utils-1.10.0-py3-none-any.whl
frozenlist @ file:///home/henrya/.cache/pypoetry/artifacts/11/a5/a9/f36d061e06bf205d08572b6ff65419c700983d3c56ee974b4dbe3ad4b6/frozenlist-1.3.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
gql @ file:///home/henrya/.cache/pypoetry/artifacts/52/e3/7e/4a4fe706da426e3997c66ee7f191f1c8156d030a9a4bff6ed2d4a8d592/gql-3.4.0-py2.py3-none-any.whl
graphql-core @ file:///home/henrya/.cache/pypoetry/artifacts/75/53/8d/5f33286601852188cf832de1c199baf000b26f8c64b648944474284504/graphql_core-3.2.1-py3-none-any.whl
grpclib @ file:///home/henrya/.cache/pypoetry/artifacts/ad/08/61/c2169abf0614513d6ff4e054e50999f70dd842af9aed8f98b067b1acc6/grpclib-0.4.3.tar.gz
h2 @ file:///home/henrya/.cache/pypoetry/artifacts/79/17/eb/ae501468cb1710f6b615c7aa96ee99c6d626c849c42165fe0ee0d4c373/h2-4.1.0-py3-none-any.whl
hexbytes @ file:///home/henrya/.cache/pypoetry/artifacts/9d/e8/a7/d39f9f688d019b882a1e724910003d6bb2d0fa993dbea3cc435481aaed/hexbytes-0.3.0-py3-none-any.whl
hpack @ file:///home/henrya/.cache/pypoetry/artifacts/9f/37/2d/a654ad50a1380727a46767cd17cbd9d1567261859f009f01390da1cca2/hpack-4.0.0-py3-none-any.whl
hyperframe @ file:///home/henrya/.cache/pypoetry/artifacts/35/2e/ce/f116fecd03c2d61d9d9753ea0a7c16db5e7bcf947be13a996c0341d58c/hyperframe-6.0.1-py3-none-any.whl
idna @ file:///home/henrya/.cache/pypoetry/artifacts/d5/04/80/9c17fd3240a37d12ff2ef042b0306aeb1abd2d8b95f150fd60be938352/idna-3.3-py3-none-any.whl
ipfshttpclient @ file:///home/henrya/.cache/pypoetry/artifacts/2f/2d/bb/d866e8c67290ed7b0cf19421ca374d63708d8533c7c8fb59219053394e/ipfshttpclient-0.8.0a2-py3-none-any.whl
jsonschema @ file:///home/henrya/.cache/pypoetry/artifacts/e9/73/d9/12b6803cd7650d65ce28f72f7ea609eedbf481bcddd946bf146242206d/jsonschema-4.14.0-py3-none-any.whl
loguru @ file:///home/henrya/.cache/pypoetry/artifacts/af/c5/2e/90fa5f415cade87a24f804aa29454a5263fa93efb5f9568878194ebad1/loguru-0.6.0-py3-none-any.whl
lru-dict @ file:///home/henrya/.cache/pypoetry/artifacts/bf/eb/b7/3eb81919ca0b1ff189a01eb323e33db65ebd889e4f7c65c62b3c46e576/lru_dict-1.1.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
multiaddr @ file:///home/henrya/.cache/pypoetry/artifacts/67/2a/d1/2fb5525bf6d58cdbaecf7fa999ee26c75137aa3f9c072fe37377d67709/multiaddr-0.0.9-py2.py3-none-any.whl
multidict @ file:///home/henrya/.cache/pypoetry/artifacts/12/d0/ef/0b7b9499611ab1817c3e84fb92c039a4fb5ac1d0397a3b86f4c5283108/multidict-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
netaddr @ file:///home/henrya/.cache/pypoetry/artifacts/05/de/10/21e693714d9b24a8d2b2e379b32fc460b450aff988eb114ec5d136dd76/netaddr-0.8.0-py2.py3-none-any.whl
parsimonious @ file:///home/henrya/.cache/pypoetry/artifacts/39/b3/97/43715ce10f0b4dce2948e62abb3eeb5b0329364a6b3be273a361bf2a80/parsimonious-0.8.1.tar.gz
protobuf @ file:///home/henrya/.cache/pypoetry/artifacts/30/0a/f0/5f9aff50877c691e404f92d476344e8d6a019fe5984fad985eb8421912/protobuf-3.20.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
pycryptodome @ file:///home/henrya/.cache/pypoetry/artifacts/ce/08/d6/313a0e3102315ae7b6ce4b0dc00e2a635f3b4798d1457d696a016ae633/pycryptodome-3.15.0-cp35-abi3-manylinux2010_x86_64.whl
pyrsistent @ file:///home/henrya/.cache/pypoetry/artifacts/0a/90/60/922630fb195d328e65883c7ca534e135921b3a28c1473b2468ff04c147/pyrsistent-0.18.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
requests @ file:///home/henrya/.cache/pypoetry/artifacts/96/68/40/1b2019f1ca6a6d07b2a3107daab4dca1e11111be3af28a435f7cd0463a/requests-2.28.1-py3-none-any.whl
requests-toolbelt @ file:///home/henrya/.cache/pypoetry/artifacts/8e/17/53/6cd3006356454687a5ea705caf4f164292347c1fcf4939b1a43716ddb6/requests_toolbelt-0.9.1-py2.py3-none-any.whl
rlp @ file:///home/henrya/.cache/pypoetry/artifacts/c7/ed/47/234067e91d2f607d0653bf177a1b70c7c0fc6c12beff758e6314f43d17/rlp-2.0.1-py2.py3-none-any.whl
six @ file:///home/henrya/.cache/pypoetry/artifacts/08/9f/47/c16ae03035fc69eaf100ea39657a49baaeef714e25a52575710c34cd48/six-1.16.0-py2.py3-none-any.whl
toolz @ file:///home/henrya/.cache/pypoetry/artifacts/47/c2/12/da9bb7e09dcc856748c7c519cbbadabe38042059f6f3ab8949a768e561/toolz-0.12.0-py3-none-any.whl
urllib3 @ file:///home/henrya/.cache/pypoetry/artifacts/af/0a/28/df174fdcb31e5a78bcea2260eb915eda3b5df188b91a0884307973699f/urllib3-1.26.12-py2.py3-none-any.whl
varint @ file:///home/henrya/.cache/pypoetry/artifacts/09/05/9f/720a3905705e8255eda839b3a399151ff88f9d6d9949c2df9b562d2272/varint-1.0.2.tar.gz
web3 @ file:///home/henrya/.cache/pypoetry/artifacts/c8/59/d8/754b20abc447d9aec9081670ffe7f7cd7c3fc62f59fb0009f2c1015ed5/web3-5.30.0-py3-none-any.whl
websockets @ file:///home/henrya/.cache/pypoetry/artifacts/5e/b1/2b/3aece0c932345491f0160dd11511fcd2d9f9284d4aecc4df1f31ab6b78/websockets-9.1-cp39-cp39-manylinux2010_x86_64.whl
yarl @ file:///home/henrya/.cache/pypoetry/artifacts/cf/b9/00/7a368ef5cf088c2e268df13556de15c4ddb35f1677ea5b6ea489408e23/yarl-1.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

What was wrong?

web3.eth.get_transaction(hash)
will raise a web3.exceptions.TransactionNotFound error if the transaction for the hash is not found but the documentation says that the function will return None in this case.

How can it be fixed?

Update the documentation to reflect the actual behaviour

@pacrob
Copy link
Contributor

pacrob commented Aug 24, 2022

Thanks for letting us know, @hashtonmartyn! I think I got everything updated in PR #2619, let me know if there's anything more.

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