thomas.c...@gmail.com
unread,Apr 23, 2013, 6:30:38 AM4/23/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pyth...@googlegroups.com
Hi all,
apologies if this is not the correct place to post this, i have a project i am looking at a kazoo interface for. I have the following test program which when running on windows throws an error but runs fine on linux (Centos 6.4).
I have the latest version of kazoo according to pip and running 2.7.3. I do my dev on windws (with PyCharm) so was hoping to be able to test this on windows and not have to cross load to linux every time. Am i doing something wrong?
Source (may look familiar!)
from kazoo.client import KazooClient
if __name__=='__main__':
zk = KazooClient(hosts='192.168.0.89')
zk.start()
# Ensure a path, create if necessary
zk.ensure_path("/my/favorite")
# Create a node with data
zk.create("/my/favorite/node", b"a value")
if zk.exists("/my/favorite"):
# Print the version of a node and its data
data, stat = zk.get("/my/favorite")
print("Version: %s, data: %s" % (stat.version, data.decode("utf-8")))
# List the children
children = zk.get_children("/my/favorite")
print("There are %s children with names %s" % (len(children), children))
zk.stop()
when run throws the following
C:\Python27\python.exe C:/Users/tom/PycharmProjects/Rivendell/Tests/ZookeeperTest/ZookeeperTest.py
No handlers could be found for logger "kazoo.protocol.connection"
Exception in thread Thread-3:
Traceback (most recent call last):
File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
self.run()
File "C:\Python27\lib\threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "C:\Python27\lib\site-packages\kazoo\protocol\connection.py", line 432, in zk_loop
if self._connect_loop(retry) is False:
File "C:\Python27\lib\site-packages\kazoo\protocol\connection.py", line 472, in _connect_loop
[], [], timeout)[0]
File "C:\Python27\lib\site-packages\kazoo\handlers\threading.py", line 254, in select
return select.select(*args, **kwargs)
error: (10038, 'An operation was attempted on something that is not a socket')
regards
Tom