ape
ape copied to clipboard
Ape Cache plugin is failing to query from the caching database
Environment information
- OS: linux
- Python Version: 3.10.4
apeand plugin versions: tokens 0.5.0 infura 0.5.0 vyper 0.5.0
$ ape --version
# ...copy and paste result of above command here...
0.5.2.dev22+g6b758dcc
What went wrong?
Please include information like:
- what command you ran
- the code that caused the failure (see this link for help with formatting code)
- full output of the error you received Using infura plugin:
ape cache init --network ethereum:mainnet:infura
ape console --network ethereum:mainnet:infura
[1]: chain.blocks.query("*", start_block=-8, stop_block=-2) # This will come from the provider
[2]: chain.blocks.query("*", start_block=-8, stop_block=-2) # This most likely will come from cache and fail...
The reason this fails is because we use "*" to call all columns, but the pydantic Model is not handling this request. It is supposed to create a list of all available fields from Blocks
How can it be fixed?
Fill this in if you have ideas on how the bug could be fixed.
But, I do believe if we fix our BaseModel, we should be able to handle this query properly
I believe I am hitting this issue.
Is it not storing in your SQLite database?
Is it not storing in your SQLite database?
I think the data it gets back fails validation somehow, like it may be not storing everything
Could be related to #1129 ?