Open
Description
Problem Description
I'm trying to read all price from solana by each time I call the function. When I set solana_network
with devnet
, it was working perfect. However, when I try to use mainet
, testnet
, or pythnet
, it can't work anymore.
Calling method
solana_network="mainnet"
use_program = True
async def SolanaPythClientPriceFunction():
async with PythClient(
first_mapping_account_key=get_key(solana_network, "mapping"),
program_key=get_key(solana_network, "program") if use_program else None,
) as c:
await c.refresh_all_prices()
Debug Console Output
.....venv\Lib\site-packages\pythclient\pythclient.py", line 185, in _refresh_mapping_accounts
raise exceptions.MissingAccountException(f"need account {key} but missing in getProgramAccount response")
pythclient.exceptions.MissingAccountException: need account AHtgzX45WTKfkPG53L6WYhGEXwQkN1BVknET3sVsLL8J but missing in getProgramAccount response
I checked the variables with debugger.
pyth-client-py/pythclient/pythclient.py
Lines 174 to 193 in bdd32b4
Until L180, everything works fine. Both key was correctly assigned values. But then, at L183,
m_data = account_json.get(AHtgzX45WTKfkPG53L6WYhGEXwQkN1BVknET3sVsLL8J )
it reads empty data.
Is this an error with mapping key? ( I checked with Pyth Network Website, the key is as same as here) Or with the method that I calling it?
Metadata
Metadata
Assignees
Labels
No labels