Hi,
The bittensor sdk fails when attempting to obtain the metagraph for subnet 2:
import bittensor as bt
bt.Subtensor().subnets.metagraph(2)
This causes the following error:
File ".../bittensor/metagraph.py", line 500, in _timelock_round
for variant, value in (entry or {}).items()
^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'items'
The commit info fields list for this sn is just a single string value:
import bittensor as bt
client = bt.Subtensor()
committed = client.query_map(bt.storage.Commitments.CommitmentOf, [2])
print(committed[0][1]['info']['fields'])
# ['ResetBondsFlag']
whereas it's expecting a dictionary here:
|
for variant, value in (entry or {}).items(): |
and here:
|
for variant, value in (entry or {}).items() |
Replacing (entry or {}) with (entry if isinstance(entry, dict) else {}) got me up and running again but I'm not sure that's the way you'd like to address it.
Hi,
The bittensor sdk fails when attempting to obtain the metagraph for subnet 2:
This causes the following error:
The commit info fields list for this sn is just a single string value:
whereas it's expecting a dictionary here:
subtensor/sdk/python/bittensor/metagraph.py
Line 481 in c02a376
and here:
subtensor/sdk/python/bittensor/metagraph.py
Line 500 in c02a376
Replacing
(entry or {})with(entry if isinstance(entry, dict) else {})got me up and running again but I'm not sure that's the way you'd like to address it.