# Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult http://click.pocoo.org/python3/for mitigation steps

**URL:** https://discuss.elastic.co/t/click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment-consult-http-click-pocoo-org-python3-for-mitigation-steps/95264
**Category:** Logstash
**Created:** [August 1, 2017, 2:09am UTC](https://discuss.elastic.co/t/click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment-consult-http-click-pocoo-org-python3-for-mitigation-steps/95264 "2017-08-01T02:09:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jclemons7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jclemons7/32/20655_2.png) [@jclemons7](https://discuss.elastic.co/u/jclemons7)
#### Post date: [August 1, 2017, 2:09am UTC](https://discuss.elastic.co/t/click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment-consult-http-click-pocoo-org-python3-for-mitigation-steps/95264/1 "2017-08-01T02:09:34Z")

</div>

Hello, I'm trying to write a script the invokes Curator to clean up my indexes after 14 days. If I run the following cli script manually:

./opt/elasticsearch-curator/curator\_cli delete\_indices --filter\_list '[{"filtertype":"age","source":"creation\_date","direction":"older","unit":"days","unit\_count":14},{"filtertype":"pattern","kind":"prefix","value":"syslog"}]'

It works famously, but if I invoke the same exact command through cron I get the following error:

Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult [http://click.pocoo.org/python3/for](http://click.pocoo.org/python3/for) mitigation steps.

This system lists a couple of UTF-8 supporting locales that  
you can pick from. The following suitable locales where  
discovered: aa\_DJ.utf8, aa\_ER.utf8, aa\_ET.utf8, af\_ZA.utf8, am\_ET.utf8, an\_ES.utf8, ar\_AE.utf8, ar\_BH.utf8, ar\_DZ.utf8, ar\_EG.utf8, ar\_IN.utf8, ar\_IQ.utf8, ar\_JO.utf8, ar\_KW.utf8, ar\_LB.utf8, ar\_LY.utf8, ar\_MA.utf8, ar\_OM.utf8, ar\_QA.utf8, ar\_SA.utf8, ar\_SD.utf8, ar\_SY.utf8, ar\_TN.utf8, ar\_YE.utf8, as\_IN.utf8, ast\_ES.utf8, ayc\_PE.utf8, az\_AZ.utf8, be\_BY.utf8, bem\_ZM.utf8, ber\_DZ.utf8, ber\_MA.utf8, bg\_BG.utf8, bho\_IN.utf8, bn\_BD.utf8, bn\_IN.utf8, bo\_CN.utf8, bo\_IN.utf8, br\_FR.utf8, brx\_IN.utf8, bs\_BA.utf8, byn\_ER.utf8, ca\_AD.utf8, ca\_ES.utf8, ca\_FR.utf8, ca\_IT.utf8, crh\_UA.utf8, cs\_CZ.utf8, csb\_PL.utf8, cv\_RU.utf8, cy\_GB.utf8, da\_DK.utf8, de\_AT.utf8, de\_BE.utf8, de\_CH.utf8, de\_DE.utf8, de\_LU.utf8, doi\_IN.utf8, dv\_MV.utf8, dz\_BT.utf8, el\_CY.utf8, el\_GR.utf8, en\_AG.utf8, en\_AU.utf8, en\_BW.utf8, en\_CA.utf8, en\_DK.utf8, en\_GB.utf8, en\_HK.utf8, en\_IE.utf8, en\_IN.utf8, en\_NG.utf8, en\_NZ.utf8, en\_PH.utf8, en\_SG.utf8, en\_US.utf8, en\_ZA.utf8, en\_ZM.utf8, en\_ZW.utf8, es\_AR.utf8, es\_BO.utf8, es\_CL.utf8, es\_CO.utf8, es\_CR.utf8, es\_CU.utf8, es\_DO.utf8, es\_EC.utf8, es\_ES.utf8, es\_GT.utf8, es\_HN.utf8, es\_MX.utf8, es\_NI.utf8, es\_PA.utf8, es\_PE.utf8, es\_PR.utf8, es\_PY.utf8, es\_SV.utf8, es\_US.utf8, es\_UY.utf8, es\_VE.utf8, et\_EE.utf8, eu\_ES.utf8, fa\_IR.utf8, ff\_SN.utf8, fi\_FI.utf8, fil\_PH.utf8, fo\_FO.utf8, fr\_BE.utf8, fr\_CA.utf8, fr\_CH.utf8, fr\_FR.utf8, fr\_LU.utf8, fur\_IT.utf8, fy\_DE.utf8, fy\_NL.utf8, ga\_IE.utf8, gd\_GB.utf8, gez\_ER.utf8, gez\_ET.utf8, gl\_ES.utf8, gu\_IN.utf8, gv\_GB.utf8, ha\_NG.utf8, he\_IL.utf8, hi\_IN.utf8, hne\_IN.utf8, hr\_HR.utf8, hsb\_DE.utf8, ht\_HT.utf8, hu\_HU.utf8, hy\_AM.utf8, ia\_FR.utf8, id\_ID.utf8, ig\_NG.utf8, ik\_CA.utf8, is\_IS.utf8, it\_CH.utf8, it\_IT.utf8, iu\_CA.utf8, iw\_IL.utf8, ja\_JP.utf8, ka\_GE.utf8, kk\_KZ.utf8, kl\_GL.utf8, km\_KH.utf8, kn\_IN.utf8, ko\_KR.utf8, kok\_IN.utf8, ks\_IN.utf8, ku\_TR.utf8, kw\_GB.utf8, ky\_KG.utf8, lb\_LU.utf8, lg\_UG.utf8, li\_BE.utf8, li\_NL.utf8, lij\_IT.utf8, lo\_LA.utf8, lt\_LT.utf8, lv\_LV.utf8, mag\_IN.utf8, mai\_IN.utf8, mg\_MG.utf8, mhr\_RU.utf8, mi\_NZ.utf8, mk\_MK.utf8, ml\_IN.utf8, mn\_MN.utf8, mni\_IN.utf8, mr\_IN.utf8, ms\_MY.utf8, mt\_MT.utf8, my\_MM.utf8, nb\_NO.utf8, nds\_DE.utf8, nds\_NL.utf8, ne\_NP.utf8, nhn\_MX.utf8, niu\_NU.utf8, niu\_NZ.utf8, nl\_AW.utf8, nl\_BE.utf8, nl\_NL.utf8, nn\_NO.utf8, nr\_ZA.utf8, nso\_ZA.utf8, oc\_FR.utf8, om\_ET.utf8, om\_KE.utf8, or\_IN.utf8, os\_RU.utf8, pa\_IN.utf8, pa\_PK.utf8, pap\_AN.utf8, pl\_PL.utf8, ps\_AF.utf8, pt\_BR.utf8, pt\_PT.utf8, ro\_RO.utf8, ru\_RU.utf8, ru\_UA.utf8, rw\_RW.utf8, sa\_IN.utf8, sat\_IN.utf8, sc\_IT.utf8, sd\_IN.utf8, se\_NO.utf8, shs\_CA.utf8, si\_LK.utf8, sid\_ET.utf8, sk\_SK.utf8, sl\_SI.utf8, so\_DJ.utf8, so\_ET.utf8, so\_KE.utf8, so\_SO.utf8, sq\_AL.utf8, sq\_MK.utf8, sr\_ME.utf8, sr\_RS.utf8, ss\_ZA.utf8, st\_ZA.utf8, sv\_FI.utf8, sv\_SE.utf8, sw\_KE.utf8, sw\_TZ.utf8, szl\_PL.utf8, ta\_IN.utf8, ta\_LK.utf8, te\_IN.utf8, tg\_TJ.utf8, th\_TH.utf8, ti\_ER.utf8, ti\_ET.utf8, tig\_ER.utf8, tk\_TM.utf8, tl\_PH.utf8, tn\_ZA.utf8, tr\_CY.utf8, tr\_TR.utf8, ts\_ZA.utf8, tt\_RU.utf8, ug\_CN.utf8, uk\_UA.utf8, unm\_US.utf8, ur\_IN.utf8, ur\_PK.utf8, ve\_ZA.utf8, vi\_VN.utf8, wa\_BE.utf8, wae\_CH.utf8, wal\_ET.utf8, wo\_SN.utf8, xh\_ZA.utf8, yi\_US.utf8, yo\_NG.utf8, yue\_HK.utf8, zh\_CN.utf8, zh\_HK.utf8, zh\_SG.utf8, zh\_TW.utf8, zu\_ZA.utf8

When used with Python 3 (and the DEB and RPM packages of Curator are compiled  
and bundled with Python 3), Curator requires the locale to be unicode. Any of  
the above unicode definitions are acceptable.

To set the locale to be unicode, try:

$ export LC\_ALL=en\_US.utf8  
$ curator\_cli [ARGS]

Alternately, you should be able to specify the locale on the command-line:

$ LC\_ALL=en\_US.utf8 curator\_cli [ARGS]

Be sure to substitute your unicode variant for en\_US.utf8

I've followed the following tutorial:

[https://www.elastic.co/guide/en/elasticsearch/client/curator/current/faq\_unicode.html](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/faq_unicode.html)

which indicates that I needed to change my locale to ut8 (which I've done)

I also have read this:

> <https://github.com/elastic/curator/issues/936>

All to no avail.. any help is appreciated

---

<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: [August 17, 2017, 5:05pm UTC](https://discuss.elastic.co/t/click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment-consult-http-click-pocoo-org-python3-for-mitigation-steps/95264/2 "2017-08-17T17:05:23Z")

</div>

If you're followed the tutorial, it should work. What is happening in your environment?

```auto
[buh@centos7-pkg-test ~]$ curator --help
Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult http://click.pocoo.org/python3/for mitigation steps.

This system lists a couple of UTF-8 supporting locales that
you can pick from. The following suitable locales where
discovered: aa_DJ.utf8, aa_ER.utf8, aa_ET.utf8, af_ZA.utf8, am_ET.utf8, an_ES.utf8, ar_AE.utf8, ar_BH.utf8, ar_DZ.utf8, ar_EG.utf8, ar_IN.utf8, ar_IQ.utf8, ar_JO.utf8, ar_KW.utf8, ar_LB.utf8, ar_LY.utf8, ar_MA.utf8, ar_OM.utf8, ar_QA.utf8, ar_SA.utf8, ar_SD.utf8, ar_SY.utf8, ar_TN.utf8, ar_YE.utf8, as_IN.utf8, ast_ES.utf8, ayc_PE.utf8, az_AZ.utf8, be_BY.utf8, bem_ZM.utf8, ber_DZ.utf8, ber_MA.utf8, bg_BG.utf8, bho_IN.utf8, bn_BD.utf8, bn_IN.utf8, bo_CN.utf8, bo_IN.utf8, br_FR.utf8, brx_IN.utf8, bs_BA.utf8, byn_ER.utf8, ca_AD.utf8, ca_ES.utf8, ca_FR.utf8, ca_IT.utf8, crh_UA.utf8, cs_CZ.utf8, csb_PL.utf8, cv_RU.utf8, cy_GB.utf8, da_DK.utf8, de_AT.utf8, de_BE.utf8, de_CH.utf8, de_DE.utf8, de_LU.utf8, doi_IN.utf8, dv_MV.utf8, dz_BT.utf8, el_CY.utf8, el_GR.utf8, en_AG.utf8, en_AU.utf8, en_BW.utf8, en_CA.utf8, en_DK.utf8, en_GB.utf8, en_HK.utf8, en_IE.utf8, en_IN.utf8, en_NG.utf8, en_NZ.utf8, en_PH.utf8, en_SG.utf8, en_US.utf8, en_ZA.utf8, en_ZM.utf8, en_ZW.utf8, es_AR.utf8, es_BO.utf8, es_CL.utf8, es_CO.utf8, es_CR.utf8, es_CU.utf8, es_DO.utf8, es_EC.utf8, es_ES.utf8, es_GT.utf8, es_HN.utf8, es_MX.utf8, es_NI.utf8, es_PA.utf8, es_PE.utf8, es_PR.utf8, es_PY.utf8, es_SV.utf8, es_US.utf8, es_UY.utf8, es_VE.utf8, et_EE.utf8, eu_ES.utf8, fa_IR.utf8, ff_SN.utf8, fi_FI.utf8, fil_PH.utf8, fo_FO.utf8, fr_BE.utf8, fr_CA.utf8, fr_CH.utf8, fr_FR.utf8, fr_LU.utf8, fur_IT.utf8, fy_DE.utf8, fy_NL.utf8, ga_IE.utf8, gd_GB.utf8, gez_ER.utf8, gez_ET.utf8, gl_ES.utf8, gu_IN.utf8, gv_GB.utf8, ha_NG.utf8, he_IL.utf8, hi_IN.utf8, hne_IN.utf8, hr_HR.utf8, hsb_DE.utf8, ht_HT.utf8, hu_HU.utf8, hy_AM.utf8, ia_FR.utf8, id_ID.utf8, ig_NG.utf8, ik_CA.utf8, is_IS.utf8, it_CH.utf8, it_IT.utf8, iu_CA.utf8, iw_IL.utf8, ja_JP.utf8, ka_GE.utf8, kk_KZ.utf8, kl_GL.utf8, km_KH.utf8, kn_IN.utf8, ko_KR.utf8, kok_IN.utf8, ks_IN.utf8, ku_TR.utf8, kw_GB.utf8, ky_KG.utf8, lb_LU.utf8, lg_UG.utf8, li_BE.utf8, li_NL.utf8, lij_IT.utf8, lo_LA.utf8, lt_LT.utf8, lv_LV.utf8, mag_IN.utf8, mai_IN.utf8, mg_MG.utf8, mhr_RU.utf8, mi_NZ.utf8, mk_MK.utf8, ml_IN.utf8, mn_MN.utf8, mni_IN.utf8, mr_IN.utf8, ms_MY.utf8, mt_MT.utf8, my_MM.utf8, nb_NO.utf8, nds_DE.utf8, nds_NL.utf8, ne_NP.utf8, nhn_MX.utf8, niu_NU.utf8, niu_NZ.utf8, nl_AW.utf8, nl_BE.utf8, nl_NL.utf8, nn_NO.utf8, nr_ZA.utf8, nso_ZA.utf8, oc_FR.utf8, om_ET.utf8, om_KE.utf8, or_IN.utf8, os_RU.utf8, pa_IN.utf8, pa_PK.utf8, pap_AN.utf8, pl_PL.utf8, ps_AF.utf8, pt_BR.utf8, pt_PT.utf8, ro_RO.utf8, ru_RU.utf8, ru_UA.utf8, rw_RW.utf8, sa_IN.utf8, sat_IN.utf8, sc_IT.utf8, sd_IN.utf8, se_NO.utf8, shs_CA.utf8, si_LK.utf8, sid_ET.utf8, sk_SK.utf8, sl_SI.utf8, so_DJ.utf8, so_ET.utf8, so_KE.utf8, so_SO.utf8, sq_AL.utf8, sq_MK.utf8, sr_ME.utf8, sr_RS.utf8, ss_ZA.utf8, st_ZA.utf8, sv_FI.utf8, sv_SE.utf8, sw_KE.utf8, sw_TZ.utf8, szl_PL.utf8, ta_IN.utf8, ta_LK.utf8, te_IN.utf8, tg_TJ.utf8, th_TH.utf8, ti_ER.utf8, ti_ET.utf8, tig_ER.utf8, tk_TM.utf8, tl_PH.utf8, tn_ZA.utf8, tr_CY.utf8, tr_TR.utf8, ts_ZA.utf8, tt_RU.utf8, ug_CN.utf8, uk_UA.utf8, unm_US.utf8, ur_IN.utf8, ur_PK.utf8, ve_ZA.utf8, vi_VN.utf8, wa_BE.utf8, wae_CH.utf8, wal_ET.utf8, wo_SN.utf8, xh_ZA.utf8, yi_US.utf8, yo_NG.utf8, yue_HK.utf8, zh_CN.utf8, zh_HK.utf8, zh_SG.utf8, zh_TW.utf8, zu_ZA.utf8

When used with Python 3 (and the DEB and RPM packages of Curator are compiled
and bundled with Python 3), Curator requires the locale to be unicode. Any of
the above unicode definitions are acceptable.

To set the locale to be unicode, try:

$ export LC_ALL=en_US.utf8
$ curator [ARGS]

Alternately, you should be able to specify the locale on the command-line:

$ LC_ALL=en_US.utf8 curator [ARGS]

Be sure to substitute your unicode variant for en_US.utf8

[buh@centos7-pkg-test ~]$ export LC_ALL=en_US.utf8
[buh@centos7-pkg-test ~]$ curator --help
Usage: curator [OPTIONS] ACTION_FILE

  Curator for Elasticsearch indices.

  See http://elastic.co/guide/en/elasticsearch/client/curator/current

Options:
  --config PATH Path to configuration file. Default: ~/.curator/curator.yml
  --dry-run Do not perform any changes.
  --version Show the version and exit.
  --help Show this message and exit.

```

This is what it looks like on a test VM after enabling utf8 at the command-line.

---

<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: [September 14, 2017, 5:05pm UTC](https://discuss.elastic.co/t/click-will-abort-further-execution-because-python-3-was-configured-to-use-ascii-as-encoding-for-the-environment-consult-http-click-pocoo-org-python3-for-mitigation-steps/95264/3 "2017-09-14T17:05:41Z")

</div>

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