# When running Curator action.yml, getting error

**URL:** <https://discuss.elastic.co/t/when-running-curator-action-yml-getting-error/156201>\
**Category:** Elasticsearch\
**Created:** [November 11, 2018, 1:05pm UTC](https://discuss.elastic.co/t/when-running-curator-action-yml-getting-error/156201 "2018-11-11T13:05:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleksei.saiko](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@aleksei.saiko](https://discuss.elastic.co/u/aleksei.saiko)\
**Post date:** [November 11, 2018, 1:05pm UTC](https://discuss.elastic.co/t/when-running-curator-action-yml-getting-error/156201/1 "2018-11-11T13:05:58Z")

</div>

Hi there!  
Can you please help with the following -  
When I'm running the following command -

```auto
curator action.yml

```

I receive the following error -

```auto
Traceback (most recent call last):
  File "/usr/local/bin/curator", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/curator/cli.py", line 213, in cli
    run(config, action_file, dry_run)
  File "/usr/local/lib/python2.7/dist-packages/curator/cli.py", line 117, in run
    action_config = get_yaml(action_file)
  File "/usr/local/lib/python2.7/dist-packages/curator/utils.py", line 56, in get_yaml
    'Unable to parse YAML file. Error: {0}'.format(e))
curator.exceptions.ConfigurationError: Unable to parse YAML file. Error: mapping values are not allowed here
  in "<string>", line 20, column 13:
          source: creation_date
                ^

```

My action file -

```auto
---
actions:
  1:
    action: snapshot
    description: >-
      Make backups of indices older then 2 days.
    options:
      repository: my_s3_repository
      name: backup-%Y.%m.%d
      ignore_unavailable: False
      include_global_state: True
      partial: False
      wait_for_completion: True
      skip_repo_fs_check: False
      timeout_override:
      continue_if_exception: False
      disable_action: False
    filters:
    — filtertype: age
      source: creation_date
      direction: older
      unit: days
      unit_count: 2
      exclude:
  2:
    action: delete_indices
    description: >-
      Delete indices older than 2 days (based on index name).
    options:
      ignore_empty_list: True
      timeout_override:
      continue_if_exception: False
      disable_action: False
    filters:
    — filtertype: pattern
      source: name
      direction: older
      timestring: ‘%Y.%m.%d’
      unit: days
      unit_count: 2

```

My conf file -

```auto
---

client:
  hosts: 127.0.0.1
  port: 9200
  timeout: 30
  master_only: False

logging:
  loglevel: INFO
  logfile: /var/log/curator/curator.log

```

curator --version

```auto
curator, version 5.5.4

```

Logs -

```auto
2018-11-11 16:03:32,385 DEBUG curator.cli run:108 Client and logging options validated.
2018-11-11 16:03:32,386 DEBUG curator.cli run:112 default_timeout = 300
2018-11-11 16:03:32,386 DEBUG curator.cli run:116 action_file: /root/.curator/action.yml

```

Would be appreciated for any help!

---

<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:** [November 11, 2018, 4:08pm UTC](https://discuss.elastic.co/t/when-running-curator-action-yml-getting-error/156201/2 "2018-11-11T16:08:53Z")

</div>

When I pasted your content, I discovered a non-typical dash for `- filtertype: age`. I saw an emdash (—) instead of a regular hyphen (-). That might be the cause.

---

<div class="post-metadata">

**Author:** ![aleksei.saiko](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@aleksei.saiko](https://discuss.elastic.co/u/aleksei.saiko)\
**Post date:** [November 11, 2018, 4:15pm UTC](https://discuss.elastic.co/t/when-running-curator-action-yml-getting-error/156201/3 "2018-11-11T16:15:48Z")

</div>

O damn... you're right, it's working now.  
Such a stupid mistake...

Thanks!

---

<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:** [December 9, 2018, 4:15pm UTC](https://discuss.elastic.co/t/when-running-curator-action-yml-getting-error/156201/4 "2018-12-09T16:15:57Z")

</div>

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