'NonType' Python Error

Hi guys Im receiving this from the exec DAT.

AttributeError: ‘Nonetype’ object has no attribute ‘val’. (Im new to python, I looked into the documentation, they said that my attribute is probably set to none. But from my understanding table_look_lookup everything seems to be correctly specified )

[code]
def valueChange(channel, sampleIndex, val, prev):

target_panel		= lookup[ channel.name, 'target_panel' ].val
panel_val			= lookup[ channel.name, 'val' ]
invert				= lookup[ channel.name, 'invert' ]

if "s" in target_panel:
	
	if panel_val == "u":
		op( target_panel ).panel.u			= abs( val - invert )


elif "b" in target_panel:
	if panel_val == "state":
		op( target_panel ).panel.state		= abs( val - invert )
		
	elif panel_val == "state2" in target_panel:
		op( target_panel ).panel.state2		= abs( val - invert )

	else:
		pass
else:
	pass

return[/code]

Im missing something, flying solo is penible…



You are trying to lookup a channel.name that doesn’t exist as a row in your table . Hence the lookup[] returns none, and none has no attribute val (which you are trying to access). So either rename your chop channels or add the current names to your lookup table

Yes indeed, what I did is that I brought in the Correct midi map in (previously was just the midi in). And in the Export DAT, I specified the channel I wanted to work with. This logic make sense to me…

Should have seen it from a different perspective?

Thanks

I’m not following.which export DAT?

Anyways, do you still have a problem or could you fix it ?