twindb / pyetcd Goto Github PK
View Code? Open in Web Editor NEWEtcd SDK
Home Page: https://twindb.com
License: Other
Etcd SDK
Home Page: https://twindb.com
License: Other
Traceback (most recent call last):
File "service.py", line 107, in <module>
iface = Interface()
File "service.py", line 16, in __init__
amqp_url = etc.read("/services/amqp-url").node["value"]
File "C:\Program Files\Python35\lib\site-packages\pyetcd\client.py", line 102, in read
return self._request_key(key, params=kwargs)
File "C:\Program Files\Python35\lib\site-packages\pyetcd\client.py", line 290, in _request_key
return self._request_call(uri, method=method, **kwargs)
File "C:\Program Files\Python35\lib\site-packages\pyetcd\client.py", line 302, in _request_call
return EtcdResult(getattr(requests, method)(url, **kwargs))
File "C:\Program Files\Python35\lib\site-packages\pyetcd\__init__.py", line 267, in __init__
raise EtcdException(err)
pyetcd.EtcdException: the JSON object must be str, not 'bytes'
Came across this issue on Python 3, the response content is encoded as 'bytes' in version 3 and needs to be decoded to str.
Installing the module requires unnecessary mock
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Searching for pyetcd
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Reading https://pypi.python.org/simple/pyetcd/
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Best match: pyetcd 1.0.1
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Downloading https://pypi.python.org/packages/8f/47/49ff263349a0a0b6f38d778f2825e8b73fad919734c555989a0af2ec6671/pyetcd-1.0.1.tar.gz#md5=a7cd46602035c7bf102f6d86fd425685
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Processing pyetcd-1.0.1.tar.gz
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Writing /tmp/easy_install-o0BpBp/pyetcd-1.0.1/setup.cfg
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Running pyetcd-1.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-o0BpBp/pyetcd-1.0.1/egg-dist-tmp-p1SUwR
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: warning: no previously-included files matching '__pycache__' found under directory '*'
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: warning: no previously-included files matching '*.py[co]' found under directory '*'
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: warning: no files found matching '*.jpg' under directory 'docs'
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: warning: no files found matching '*.png' under directory 'docs'
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: warning: no files found matching '*.gif' under directory 'docs'
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Adding pyetcd 1.0.1 to easy-install.pth file
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns:
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Installed /usr/lib/python2.7/site-packages/pyetcd-1.0.1-py2.7.egg
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Searching for mock
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Reading https://pypi.python.org/simple/mock/
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Best match: mock 2.0.0
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Downloading https://pypi.python.org/packages/0c/53/014354fc93c591ccc4abff12c473ad565a2eb24dcd82490fae33dbf2539f/mock-2.0.0.tar.gz#md5=0febfafd14330c9dcaa40de2d82d40ad
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Processing mock-2.0.0.tar.gz
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Writing /tmp/easy_install-fpNc4_/mock-2.0.0/setup.cfg
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Running mock-2.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-fpNc4_/mock-2.0.0/egg-dist-tmp-myRGr_
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: error: Installed distribution setuptools 0.9.8 conflicts with requirement setuptools>=17.1```
read(), write() and other Client()'s methods should accept optional parameters.
for example,
c.read('/foo/bar', params={
'waitIndex': 7
}, wait=True)
etcd version: 1.7.1
python version: 2.7.10
os version: ubuntu 16.04
Does pyetcd support auth? How to use?
Hi ๐
This is my first visit to this fine repo, but it seems you have been working hard to keep all dependencies updated so far.
Once you have closed this issue, I'll create seperate pull requests for every update as soon as I find one.
That's it for now!
Happy merging! ๐ค
Implement version() method in Client. It should return version of etcd server
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.