# \#unpack

**URL:** https://forums.digi.com/tag/unpack/4389.md

[Latest](https://forums.digi.com/latest.md) · [Categories](https://forums.digi.com/categories.md) · [Tags](https://forums.digi.com/tags.md)

---

## [Receiving KeyError when trying to unpack dictionary to configure xbee](https://forums.digi.com/t/receiving-keyerror-when-trying-to-unpack-dictionary-to-configure-xbee/21524)

<div class="topic-metadata">

**Author:** [@DKuchen](https://forums.digi.com/u/DKuchen)\
**Replies:** 1\
**Last updated:** [July 7, 2020, 2:10pm UTC](https://forums.digi.com/t/receiving-keyerror-when-trying-to-unpack-dictionary-to-configure-xbee/21524 "2020-07-07T14:10:17Z")

</div>

I am getting a ‘KeyError: N’ when I try to run the following code, CONTROLLER\_CONFIG = { ‘ID’: 1986, ‘CE’: 1, ‘NI’: ‘Controller’, ‘AP’: 4 } def configure\_node(\*\*kwargs): for cmd, value in kwargs.items(): print(c…
