Error: KeyError: 'bottomUpIn'

Hi !
I got next errors :
File “/home/sergey/.local/lib/python2.7/site-packages/nupic/regions/”, line 537, in _compute
buInputVector = inputs[‘bottomUpIn’] #inputs bottomUpIn
KeyError: ‘bottomUpIn’

Do you have some thoughts, how can I solve this errors.
Thanx a lot,

Sergey, we are definitely going to need to see some of your code to help debug this problem.

@rhyolight We separate our project in module. I think it is depend on network and link module .

    # import global modules
    import re

    # import nupic modules
    from nupic.engine import Network

    # import custom modules
    import include.utils as utils
    from L1 import L1
    from Ch1 import Ch1
    from links import Links
    from include.filter.f1_region import F1Region
    from include.region.pluggable_encoder_sensor_patch import PluggableEncoderSensorPatch
    from include.region.pluggable_encoder_sensor_patch_chunk import PluggableEncoderSensorPatchChunk

    class HTMNetwork():
    	def __init__(self, load):
    		self.loadPath = '/var/www/challenge/model/model.nta'
    		self.wordEndCode = 31
    		self.chunkStartCode = 1
    		self.chunkEndCode = 2

    		if load == True: = self.load()
    		else: = self.newNetwork()

    		# get network regions

    	def newNetwork(self):
    		self.registerRegions() = Network()

    		# Create Level 1
    		level1 = L1( = level1.initialize()

    		# Create Chunk region 1
    		chunk1 = Ch1( = chunk1.initialize()

    		# Create network links

    		# Filter 1 output is end of word or emtpy array = Filter1(
    		# Filter 2 make groups in
    		# network = Filter1(network)


    	def load(self):
    		TODO! load nrtwork
    		self.registerRegions() = Network(self.loadPath)


    	def registerRegions(self):

    	def networkRegions(self):
    		# Network regions

    		# level 1
    		self.L1_Region_encoder =['L1_encoder']
    		self.L1_Region_sp =['L1_sp']
    		self.L1_Region_tm =['L1_tm']
    		self.L1_Region_classifier =['L1_classifier']

    		# chunk level 1

    	def turnOnLearning(self):
    		self.L1_Region_sp.setParameter('learningMode', True)
    		self.L1_Region_tm.setParameter('learningMode', True)
    		self.L1_Region_classifier.setParameter('learningMode', True)

    	def turnOffLearning(self):
    		self.L1_Region_sp.setParameter('learningMode', False)
    		self.L1_Region_tm.setParameter('learningMode', False)
    		self.L1_Region_classifier.setParameter('learningMode', False)

    	def run(self, learn=False, sequence=None, answer=None, times=1, singleWord=False):
    		network run for learning or getting inference
    		:param learn: bolean. Need to learn or get inference
    		:param sequence: string that contains sequence for learning
    		:param answer: if @sequence has answer - string with answer
    		:param times: num iterations for learning
    		:param singleWord: is @sequence a single word
    		:return: None
    		if learn == True:
    			return self.learning(sequence, answer, times, singleWord)
    			return self.inference()

    		TODO! sequence with answer
    		if answer != None:
    			# print L1_spRegion.spec
    			# print L1_tmRegion.spec
    			# exit()
    			print 1

    	def inference(self):
    		return 1

    	def learning(self, sequence=None, answer=None, times=1, singleWord=False):
    		if sequence == None:
    			return False
    		# else:
    		# 	sequence = re.sub(' +', ' ', sequence)

    		# IF single word, add word's end symbol
    		if singleWord == True:
    			sequence += chr(self.wordEndCode)

    		# Turn on learning

    		if answer != None:
    			self.learningAsIs(sequence, times)

    		return 1

    	def learningAsIs(self, sequence=None, times=1):
    		for x in range(times):
    			for symbol in sequence:
    				s = utils.symbolToInt(symbol)
    				# print s


    				# print self.L1_Region_encoder.spec
    				# print self.L1_Region_classifier.spec
    				# exit()

    				# print len(L1_tmRegion.getOutputData("lrnActiveStateT"))
    				# print len(L1_tmRegion.getOutputData("activeCells"))
    				# print len(L1_tmRegion.getOutputData("bottomUpOut"))
    				# print len(L1_tmRegion.getOutputData("topDownOut"))
    				# print len(L1_tmRegion.getOutputData("predictedActiveCells"))
    				# print (L1_tmRegion.getOutputData("bottomUpOut").nonzero())
    				# print len(L1_tmRegion.getOutputData("anomalyScore"))
    				if x == 49 and s != 31:
    					print '*' * 80
    					print s
    					print chr(s)
    					print '-' * 80
    					l2Predictions = self.L1_Region_classifier.getOutputData("actualValues")
    					l2Probabilities = self.L1_Region_classifier.getOutputData("probabilities")
    					l2Prediction = l2Predictions[l2Probabilities.argmax()]
    					if type(l2Prediction) != float:
    						l2Prediction = float(l2Prediction)
    						print int(l2Prediction)
    						print chr(int(round(l2Prediction)))
    						print (l2Prediction)
    						print chr(int(l2Prediction))
    					print '*' * 80

    		return 1

    	def learningWithAnswer(self):
    		return 1

And our link module

    Links between all network regions
    import utils

    class Links():
    	def __init__(self, network=None): = network

    	def links(self):'L1_encoder', 'L1_sp', 'UniformLink', '')'L1_sp', 'L1_tm', 'UniformLink', '')'L1_tm', 'L1_classifier', 'UniformLink', '')
  'L1_classifier', 'Ch1_encoder', 'UniformLink', '')

    		utils.encoderToClassifierLinks(, 'L1_encoder', 'L1_classifier')'Ch1_encoder', 'Ch1_sp', 'UniformLink', '')'Ch1_sp', 'Ch1_tm', 'UniformLink', '')'Ch1_tm', 'Ch1_classifier', 'UniformLink', '')

    		utils.encoderToClassifierLinks(, 'Ch1_encoder', 'Ch1_classifier')'L1_encoder', 'Ch1_encoder', 'UniformLink', '', srcOutput='actValueOut', destInput='actualValueIn')'L1_encoder', 'Ch1_encoder', 'UniformLink', '', srcOutput='dataOut', destInput='encoderSdrIn')'L1_classifier', 'Ch1_encoder', 'UniformLink', '', srcOutput='actualValues', destInput='classifierValuesIn')'L1_classifier', 'Ch1_encoder', 'UniformLink', '', srcOutput='probabilities', destInput='predictionIn')'L1_classifier', 'Ch1_encoder', 'UniformLink', '', srcOutput='actValueOut', destInput='actualValueIn')