# ERROR Delete\_snapshot action fails, get() takes at least 2 arguments (2 given)

**URL:** <https://discuss.elastic.co/t/error-delete-snapshot-action-fails-get-takes-at-least-2-arguments-2-given/227429>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [April 10, 2020, 2:45am UTC](https://discuss.elastic.co/t/error-delete-snapshot-action-fails-get-takes-at-least-2-arguments-2-given/227429 "2020-04-10T02:45:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![codenamekazmi](https://avatars.discourse-cdn.com/v4/letter/c/858c86/32.png) [@codenamekazmi](https://discuss.elastic.co/u/codenamekazmi)\
**Post date:** [April 10, 2020, 2:45am UTC](https://discuss.elastic.co/t/error-delete-snapshot-action-fails-get-takes-at-least-2-arguments-2-given/227429/1 "2020-04-10T02:45:57Z")

</div>

This is a similar issue to [Delete\_snapshot action fails, get() takes at least 2 arguments (2 given)](https://discuss.elastic.co/t/delete-snapshot-action-fails-get-takes-at-least-2-arguments-2-given/219934). This issue was closed without a resolution. I am running into a similar issue.

Running elasticsearch version 6.83, verified in my DEBUG log as well:  
`Detected Elasticsearch version 6.8.3`

Running curator version 5.8.0 in a docker container running alpine linux and using pip to install elasticsearch-curator.

```auto
/usr/share/curator # /usr/bin/curator --version
curator, version 5.8.0

```

Action file:

```auto
actions:
  1:
    action: delete_snapshots
    description: >-
      Delete snapshots from the search cluster repository older than 1 week
      (based on creation_date).
    options:
      repository: s3-backup
      timeout_override: 21600
      continue_if_exception: False
      ignore_empty_list: True
      disable_action: False
    filters:
    - filtertype: age
      source: creation_date
      direction: older
      unit: weeks
      unit_count: 1
      exclude:

```

Error:

```auto
ERROR curator.cli run:213 Failed to complete action: delete_snapshots. <type 'exceptions.TypeError'>: get() takes at least 2 arguments (2 given)

```

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [April 10, 2020, 5:23am UTC](https://discuss.elastic.co/t/error-delete-snapshot-action-fails-get-takes-at-least-2-arguments-2-given/227429/2 "2020-04-10T05:23:06Z")

</div>

This is a known error because of a change in the elasticsearch python module which will be fixed shortly. You can fix it in the meanwhile by pinning `elasticsearch==7.1.0`

> <https://github.com/elastic/curator/pull/1527>

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 8, 2020, 5:23am UTC](https://discuss.elastic.co/t/error-delete-snapshot-action-fails-get-takes-at-least-2-arguments-2-given/227429/3 "2020-05-08T05:23:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
