vdloo / consul-kv Goto Github PK
View Code? Open in Web Editor NEWPython 3 client for the Consul key/value store
License: MIT License
Python 3 client for the Consul key/value store
License: MIT License
Hi,
I am calling the "conn,get(key)" within a process triggered by python's pool.map under multiprocessing module and I keep getting following error:
Traceback (most recent call last): File "heartbeat_trigger.py", line 195, in <module> main() File "heartbeat_trigger.py", line 145, in main result = pool.map(call_flow_driver, flow_group) File "C:\Python37\lib\multiprocessing\pool.py", line 268, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "C:\Python37\lib\multiprocessing\pool.py", line 657, in get raise self._value multiprocessing.pool.MaybeEncodingError: Error sending result: '<multiprocessing.pool.ExceptionWithTraceback object at 0x00000237D905F588>'. Reason: 'TypeError("cannot serialize '_io.BufferedReader' object")'
I don't get any error when I call the function without multiprocessing. Can someone suggest something ?
consul_kv: version: 0.7.3
python3: version: 3.7
I am using your example
dictionary = {
'a': {
'key': 'a_value'
},
'another': {
'k': 'another_value'
}
}
conn.put_dict(dictionary)
conn.get_dict() ---> This works and gives me all the dictionary
conn.get_dict('a') ==== > This gives me an error
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
Hi, I'm trying to do some cas txn support, would that be some work you're interested in?
/Jakob
le "/Users/bsoura/PycharmProjects/mytesting/venv/lib/python3.7/site-packages/consul_kv/init.py", line 44, in put_mapping
timeout=self.timeout
File "/Users/bsoura/PycharmProjects/mytesting/venv/lib/python3.7/site-packages/consul_kv/api.py", line 93, in put_kv_txn
with request.urlopen(req, timeout=timeout) as f:
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 413: Request Entity Too Large
Add support for Consul Tokens when using ACLs.
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.