You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, guys, thank you for the library - it's awwesome!
I use consul as a key/value storage and met the following problem.
In method consul_instance.kv.items() I got an error
Traceback (most recent call last):
File "/Users/sfokin/projects/eaas_libs/test.py", line 10, in
print(test_inst.kv.items())
File "/usr/local/lib/python3.9/site-packages/consulate/api/kv.py", line 181, in items
return [{item['Key']: item['Value']} for item in self._get_all_items()]
File "/usr/local/lib/python3.9/site-packages/consulate/api/kv.py", line 181, in
return [{item['Key']: item['Value']} for item in self._get_all_items()]
TypeError: string indices must be integers
It seems that in base.py in Response class we don't need to encode value = json.loads(body, encoding='utf-8') (line 140)
When I replaced it with this line value = json.loads(body) all worked correctly.
The text was updated successfully, but these errors were encountered:
First, guys, thank you for the library - it's awwesome!
I use consul as a key/value storage and met the following problem.
In method
consul_instance.kv.items()
I got an errorIt seems that in base.py in Response class we don't need to encode
value = json.loads(body, encoding='utf-8')
(line 140)When I replaced it with this line
value = json.loads(body)
all worked correctly.The text was updated successfully, but these errors were encountered: