poppyred/python-consul2

WriteRequest in body causes failure

punkrokk opened this issue · 0 comments

With Consul v1.7.0+, I get the following error:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/ec2-user/ttoozz/tooz/tooz/coordination.py", line 426, in start self._start() File "/home/ec2-user/ttoozz/tooz/tooz/drivers/consul.py", line 160, in _start token=self._acl_token) File "/home/ec2-user/tenv/lib64/python3.7/site-packages/consul/base.py", line 1740, in register params=params) File "/home/ec2-user/tenv/lib64/python3.7/site-packages/consul/std.py", line 32, in put cert=self.cert, timeout=self.timeout))) File "/home/ec2-user/tenv/lib64/python3.7/site-packages/consul/base.py", line 199, in cb CB._status(response) File "/home/ec2-user/tenv/lib64/python3.7/site-packages/consul/base.py", line 182, in _status raise BadRequest('%d %s' % (response.code, response.body)) consul.base.BadRequest: 400 Request decode failed: json: unknown field "WriteRequest"

This is due to consul implementing stricter json decoding.

I have submitted #8 that addresses this.