Post
Topic
Board Armory
Re: Armory BlockDataManager BDM, (TheBDM)
by
Nikhil18
on 02/10/2016, 16:56:59 UTC
Sorry for making a separate thread, I added the code as you had suggested to the init block, but I encountered a new error:

AttributeError: 'NoneType' object has no attribute 'setBlocking'

class BlockReader:
  
   def __init__(self):
      newTheBDM(False)
      self.index_db = shelve.open('armory_index');      
      self.bdm = TheBDM
      self.verbose = False
      self.coinbase = '0000000000000000000000000000000000000000000000000000000000000000'
      # self.pk_dict = {}
      self.pk_dict = bsddb.hashopen('pk_dict.bdb', 'n', cachesize=2000000)

So I looked into BDM.py class and inside the definition for the newTheBDM method there was no return statement specified so I added a return statement which returned the object TheBDM

def newTheBDM(isOffline=False):
   global TheBDM
   if TheBDM:
      TheBDM.beginCleanShutdown()
   TheBDM = BlockDataManager(isOffline=isOffline)
   return TheBDM

Now after executing the code I ran into the same problem:

AttributeError: 'BlockDataManager' object has no attribute 'setBlocking'

I don't understand, why I am encountering this issue.. thanks for your help in advance