# Problem with socket.AF\_ZIGBEE

**URL:** https://forums.digi.com/t/problem-with-socket-af-zigbee/12312
**Category:** Python
**Tags:** xbee, \-, socketcan
**Created:** [December 19, 2013, 4:20pm UTC](https://forums.digi.com/t/problem-with-socket-af-zigbee/12312 "2013-12-19T16:20:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Mithandrid](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Mithandrid](https://forums.digi.com/u/Mithandrid)
#### Post date: [December 19, 2013, 4:20pm UTC](https://forums.digi.com/t/problem-with-socket-af-zigbee/12312/1 "2013-12-19T16:20:18Z")

</div>

Hi Digi Team,

I have a problem with the socket of zigbee, I set the socket in this form because I saw this confiuration in others examples:

Zigbee\_Socket = socket(socket.AF\_ZIGBEE, socket.SOCK\_DGRAM, socket.ZBS\_PROT\_TRANSPORT)  
Zigbee\_Socket.bind((“”, 0xE8, 0, 0))  
Zigbee\_Socket.setblocking(0)  
Zigbee\_Socket.listen(1)

but on the DigiPython ESP software application when I set the run the python file, this show me the following error:

Configuracion del sokect ZIGBEE  
Traceback (most recent call last):  
File “WEB/python/dpdsrv.py”, line 14, in ?  
execfile(os.path.join(os.path.abspath(‘.’), ‘SensorWiFi.py’))  
File “WEB/python/SensorWiFi.py”, line 197, in ?  
main()  
File “WEB/python/SensorWiFi.py”, line 41, in main  
Zigbee\_Socket = socket(socket.AF\_ZIGBEE, socket.SOCK\_DGRAM, socket.ZBS\_PROT\_TRANSPOR  
T)  
AttributeError: type object ‘\_socketobject’ has no attribute ‘AF\_ZIGBEE’

but I don’t understand because, I imported the zigbee library in the begin of the file.

Can you help me with this problem? :s

Thanks Team!

---

<div class="post-metadata">

### Author: ![trooper2](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@trooper2](https://forums.digi.com/u/trooper2)
#### Post date: [December 30, 2013, 5:27pm UTC](https://forums.digi.com/t/problem-with-socket-af-zigbee/12312/2 "2013-12-30T17:27:44Z")

</div>

Please see this link [http://www.digi.com/wiki/developer/index.php/XBee\_Extensions\_to\_the\_Python\_Socket\_API#XBee\_Sockets\_Examples](http://www.digi.com/wiki/developer/index.php/XBee_Extensions_to_the_Python_Socket_API#XBee_Sockets_Examples) which has the newer AF\_XBEE.
