Code Monkey home page Code Monkey logo

Comments (4)

VAdamec avatar VAdamec commented on June 18, 2024

One step further:

[root@cns-ui-prg001 consul-api]# /usr/local/bin/consulate kv get test
b'[{"CreateIndex":58195,"ModifyIndex":58195,"LockIndex":0,"Key":"test","Flags":0,"Value":"VEVTVA=="}]'

but backup:

[root@server consul-api]# /usr/local/bin/consulate kv backup /opt/backup.dump
Traceback (most recent call last):
File "/usr/local/bin/consulate", line 9, in
load_entry_point('consulate==0.2.0', 'console_scripts', 'consulate')()
File "/usr/local/lib/python3.3/site-packages/consulate/cli.py", line 90, in main
handle.write(json.dumps(session.kv.records(),
File "/usr/local/lib/python3.3/site-packages/consulate/api.py", line 267, in records
response = self._get_list([''], {'recurse': None})
File "/usr/local/lib/python3.3/site-packages/consulate/api.py", line 83, in _get_list
result = self._get(params, query_params)
File "/usr/local/lib/python3.3/site-packages/consulate/api.py", line 77, in _get
response = self._adapter.get(self._build_uri(params, query_params))
File "/usr/local/lib/python3.3/site-packages/consulate/api.py", line 73, in _build_uri
urllib.urlencode(query_params))
AttributeError: 'module' object has no attribute 'urlencode'

from consulate.

srri-zz avatar srri-zz commented on June 18, 2024

you need to have Tornado:
sudo pip install tornado

from consulate.

awheeler avatar awheeler commented on June 18, 2024

The requirements.txt file in master doesn't list tornado, but the .20 version I installed on my Ubuntu 14.04 box with python 2.7 contains:

requests

[tornado]
tornado

Which produces the following when I run pip install -r against it:

Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 262, in run
    for req in parse_requirements(filename, finder=finder, options=options, session=session):
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1631, in parse_requirements
    req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 172, in from_line
    return cls(req, comes_from, url=url, prereleases=prereleases)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 70, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2786, in parse
    reqs = list(parse_requirements(s))
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2701, in parse_requirements
    raise ValueError("Missing distribution spec", line)
ValueError: ('Missing distribution spec', '[tornado]')

Whereas if I make the file simply:

requests
tornado

it works fine.

from consulate.

gmr avatar gmr commented on June 18, 2024

This was a problem with the distribution of 0.2.0. 0.3.0 will be out today.

from consulate.

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.