Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

TypeError: list indices must be integers or slices, not str #281

Open
dramaturg opened this issue Dec 17, 2020 · 1 comment
Open

TypeError: list indices must be integers or slices, not str #281

dramaturg opened this issue Dec 17, 2020 · 1 comment

Comments

@dramaturg
Copy link

With 1.1.0, calling catalog.node results in:

    index, node_data = self.consul_api.catalog.node(node, dc=datacenter)
  File "/nix/store/syk8xm6qgz0hqxb3gnazx9gvw70sh9ny-python3-3.8.6-env/lib/python3.8/site-packages/consul/base.py", line 1390, in node
    params['token'] = token
TypeError: list indices must be integers or slices, not str

It seems this line was missed in bb2647b - editing to use .append instead fixes the issue:

1390c1390
<                 params['token'] = token
---
>                 params.append(('token', token))
@nerzhul
Copy link

nerzhul commented Aug 27, 2021

can you merge this ? it's bugued currently with consul 1.10 too, as the module has nasty issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants