Code Monkey home page Code Monkey logo

Comments (5)

dsoprea avatar dsoprea commented on July 24, 2024

Actually, it worked when I used a fresh clone of MASTER. Going back to pip's version 0.2.0, I continue to have related issues with a GET of a folder. It seems buggy. The following all work on the version in MASTER:

>>> c.set('/a/b/c', 5)
EtcdResult(action=u'SET', index=17, key=u'/a/b/c', prevValue=u'5', value=u'5', expiration=None, ttl=None, newKey=None)

>>> c.get('/a/b/c')
EtcdResult(action=u'GET', index=17, key=u'/a/b/c', prevValue=None, value=u'5', expiration=None, ttl=None, newKey=None)

>>> c.get('/a')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/etcd/client.py", line 285, in get
    return self._result_from_response(response)
  File "/Library/Python/2.7/site-packages/etcd/client.py", line 327, in _result_from_response
    raise etcd.EtcdException('Unable to decode server response')
etcd.EtcdException: Unable to decode server response

>>> c.get('/a/b')
[EtcdResult(action=u'GET', index=17, key=u'/a/b/c', prevValue=None, value=u'5', expiration=None, ttl=None, newKey=None)]

>>> c.get('/')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/etcd/client.py", line 285, in get
    return self._result_from_response(response)
  File "/Library/Python/2.7/site-packages/etcd/client.py", line 327, in _result_from_response
    raise etcd.EtcdException('Unable to decode server response')
etcd.EtcdException: Unable to decode server response

What was fixed in the MASTER version? Can you do a tag and push to PIP?

Dustin

from python-etcd.

lavagetto avatar lavagetto commented on July 24, 2024

The first versions of python-etcd did not support listing of directories (that were not explicitly described in the etcd docs). Master is corrected and now supports correctly directory listings under API v1. About release plans, I'll leave the question to @jplana

from python-etcd.

jplana avatar jplana commented on July 24, 2024

@dsoprea I haven't tested this bug across both versions of etcd, but as @lavagetto said, we got a couple of improvements that are in only master. Will try to get a new version tonight / tomorrow morning.

from python-etcd.

jplana avatar jplana commented on July 24, 2024

I released version 0.2.1 (see 878425c) including some ssl & reconnection support, and bugfixes like directory listing. I also updated the pypi version (https://pypi.python.org/pypi/python-etcd/0.2.1) and tested that you can now execute your test without the exception. I'm closing this, but please reopen if it doesn't work for you. Thanks!

from python-etcd.

dsoprea avatar dsoprea commented on July 24, 2024

Confirmed. c.get('/') now works.

from python-etcd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.