# No module named zigbee

**URL:** <https://forums.digi.com/t/no-module-named-zigbee/3327>\
**Category:** Python\
**Created:** [June 18, 2011, 2:12pm UTC](https://forums.digi.com/t/no-module-named-zigbee/3327 "2011-06-18T14:12:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![grigou25](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@grigou25](https://forums.digi.com/u/grigou25)\
**Post date:** [June 18, 2011, 2:12pm UTC](https://forums.digi.com/t/no-module-named-zigbee/3327/1 "2011-06-18T14:12:54Z")

</div>

Hi everybody,

I work with gateway X2 and a Xbee Sensor connected. When I run the Dia in ESP, I receive the error:

ImportError: No module named zigbee

In the code:  
try:  
import xbee  
except:  
import zigbee as xbee

I don’t understand why i receive this message, could you help me, please?

Grigou

---

<div class="post-metadata">

**Author:** ![shahrj1988](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@shahrj1988](https://forums.digi.com/u/shahrj1988)\
**Post date:** [June 19, 2011, 5:26am UTC](https://forums.digi.com/t/no-module-named-zigbee/3327/2 "2011-06-19T05:26:31Z")

</div>

Hi,

This error shows that in your gateway at WEB/python/ path there is no python file named zigbee.py. Therefore you will have to upload the zigbee.py to the gateway either through WebUI or through iDigi Manager Pro.

---

<div class="post-metadata">

**Author:** ![diegoe](https://avatars.discourse-cdn.com/v4/letter/d/7ba0ec/32.png) [@diegoe](https://forums.digi.com/u/diegoe)\
**Post date:** [June 20, 2011, 9:33am UTC](https://forums.digi.com/t/no-module-named-zigbee/3327/3 "2011-06-20T09:33:18Z")

</div>

Hello Greg,

Are you trying to run the Dia in your local PC or in the X2 Gateway?

The Digi ConnectPort X products have an embedded Python module called xbee to manage the XBee interface of the device. The problem is that there is not such library for the PC, so if you try to run the Dia in your local PC you will receive that error.

At present you can run the Dia software in a PC, but without using the XBee interface.

Regards.

---

<div class="post-metadata">

**Author:** ![lynnl](https://avatars.discourse-cdn.com/v4/letter/l/22d042/32.png) [@lynnl](https://forums.digi.com/u/lynnl)\
**Post date:** [June 20, 2011, 3:35pm UTC](https://forums.digi.com/t/no-module-named-zigbee/3327/4 "2011-06-20T15:35:50Z")

</div>

That file (zigbee.py) is largely a dummy file, as the real code is in the operating system of the X2.

Create it yourself with this single line inside, then upload:

from \_zigbee import \*
