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

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

@dramaturg

Description

@dramaturg

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions