You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some fork URLs I try occasionally lead to uncaught exception that doesn't help me know what was wrong enough.
For example, the RPC: https://rpc2.sepolia.org
lead to
/Users/az/virtualenvs/ape/lib/python3.12/site-packages/boa/vm/fork.py:139: in __init__
super().__init__(caching_rpc, block_identifier, *args, **kwargs2)
/Users/az/virtualenvs/ape/lib/python3.12/site-packages/boa/vm/fork.py:156: in __init__
self._block_number = to_int(self._block_info["number"])
E TypeError: 'NoneType' object is not subscriptable
--------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
INFO: Connecting to existing Geth node at https://rpc2.sepolia.org.
---------------------------------------------------------------------------- Captured log setup -----------------------------------------------------------------------------
INFO ape:provider.py:1601 Connecting to existing Geth node at https://rpc2.sepolia.org.
========================================================================== short test summary info ==========================================================================
ERROR tests/test_fork_provider.py::test_block_identifier - TypeError: 'NoneType' object is not subscriptable
I don't know what the exact problem is so I don't know what to suggest, but maybe something like:
self._block_info = self._rpc.fetch_uncached(
"eth_getBlockByNumber", [block_identifier, False]
)
if self._block_info is None:
raise ValueError("Your RPC does not have the block ID specified.")
self._block_number = to_int(self._block_info["number"])
The text was updated successfully, but these errors were encountered:
Some fork URLs I try occasionally lead to uncaught exception that doesn't help me know what was wrong enough.
For example, the RPC: https://rpc2.sepolia.org
lead to
Maybe this is a "light" node or something.
Here is the code with the exception:
so block_info is None for some reason.
I don't know what the exact problem is so I don't know what to suggest, but maybe something like:
The text was updated successfully, but these errors were encountered: