Added try/catch
@@ -7,6 +7,7 @@ import numpy
import time
import threading
import torch
+import traceback
from loguru import logger
from bittensor import bittensor_pb2
@@ -198,6 +199,7 @@ class Metagraph():
self._pubkey_index_map[pubkey] = index
append = True
+ try:
stake = self.substrate.get_runtime_state(
module='SubtensorModule',
storage_function='Stake',
@@ -246,6 +248,9 @@ class Metagraph():
self._weight_keys.append( list(w_keys) )
self._weight_vals.append( list(w_vals) )
self._poll_list.append( current_block )
+ except Exception as e:
+ logger.error("Exception occured: {}".format(e))
+ traceback.print_exc()
def _build_torch_tensors(self):
