I am having a problem with Python. When I import both html and zigbee to the same program, the zigbee module hooks something in the dataflow (I believe socket.socket) and when I do my http call in ends up blowing up in the following traceback
File "call.py", line 76, in
main()
File "call.py", line 70, in main
callData = conn.get(parameters='call='+callsign)
File "call.py", line 33, in get
self.urlResponse = urllib.urlopen( uri )
File "/usr/lib/python2.7/urllib.py", line 84, in urlopen
File "/usr/lib/python2.7/urllib.py", line 205, in open
File "/usr/lib/python2.7/urllib.py", line 435, in open_https
File "/usr/lib/python2.7/httplib.py", line 937, in endheaders
File "/usr/lib/python2.7/httplib.py", line 797, in _send_output
File "/usr/lib/python2.7/httplib.py", line 759, in send
File "/usr/lib/python2.7/httplib.py", line 1144, in connect
File "/usr/lib/python2.7/ssl.py", line 344, in wrap_socket
File "usr/lib/python2.7/site-packages/xbee_socket_hal.py", line 106, in __new__
TypeError: __init__() got an unexpected keyword argument 'ciphers'
(source code attached)
This program does not use Zigbee, just having the import clause in the program for zigbee causes the error. On this test program simply reversing the import statements makes the error go away. However, in the client’s production program, I have tried the same trick with no luck.
It appears that the zigbee module changes socket.socket to point to xbee_socket_hal directly. Any call to any instantiated socket class is getting routed to the xbee module.
Any fixes?
RWT