Receiving KeyError when trying to unpack dictionary to configure xbee

I am getting a ‘KeyError: N’ when I try to run the following code,

‘ID’: 1986,
‘CE’: 1,
‘NI’: ‘Controller’,
‘AP’: 4

def configure_node(**kwargs):
for cmd, value in kwargs.items():
print(cmd, ’ ', value)
xbee.atcmd(cmd, value)


I can run this fine on my computer, but I get the error when trying to run it via XTCU micropython terminal. I am really clueless to what I am doing wrong.

Which XBee module are you working with, what firmware version and what is the AP command set to on that module?