# System locale settings and q2cli

**URL:** <https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814>\
**Category:** User Support\
**Tags:** locale, q2cli\
**Created:** [November 13, 2017, 3:07pm UTC](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814 "2017-11-13T15:07:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmillerlab](https://forum.qiime2.org/user_avatar/forum.qiime2.org/bmillerlab/32/674_2.png) [@bmillerlab](https://forum.qiime2.org/u/bmillerlab)\
**Post date:** [November 13, 2017, 3:07pm UTC](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814/1 "2017-11-13T15:07:34Z")

</div>

Hello, Some time ago there were a series of followups from @ebolyen regarding biom file validation problems that occur with qiime1 generated files. I do not see that this was resolved in the forum entries. I am having similar problems. Will I have to rerun all my analyses to use qiime2 with existing biom files generated by qiiime1? That would be very time consuming since I have a large data set. I have been using filter in qiime1 to pull out subsamples from the large table and do additional specific analysis with some of the data!

Here is the error:

```bash
(qiime2-2017.10) miller3:qiime2-testing Paige$ qiime tools import \
> --input-path /Users/Paige/WorkFolder_NBZLJBA6E8Z5_R1clean/otu_table_halandmock_meta_filtered.biom \
> --output-path /Users/Paige/qiime2-testing/out_hal.gza \
> --type FeatureTable[Frequency]
Traceback (most recent call last):
  File "/Users/Paige/miniconda3/envs/qiime2-2017.10/bin/qiime", line 6, in <module>
    sys.exit(q2cli. __main__.qiime())
  File "/Users/Paige/miniconda3/envs/qiime2-2017.10/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/Paige/miniconda3/envs/qiime2-2017.10/lib/python3.5/site-packages/click/core.py", line 676, in main
    _verify_python3_env()
  File "/Users/Paige/miniconda3/envs/qiime2-2017.10/lib/python3.5/site-packages/click/_unicodefun.py", line 118, in _verify_python3_env
    'for mitigation steps.' + extra)
RuntimeError: 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.

```

I did look at the mitigation steps but I don't see how they are helpful.

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [November 13, 2017, 4:25pm UTC](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814/2 "2017-11-13T16:25:40Z")

</div>

Hi @bmillerlab! I think the "biom file validation" is a bit of a [red herring](https://en.wikipedia.org/wiki/Red_herring), it looks like there are [some issues](http://click.pocoo.org/5/python3/#python-3-surrogate-handling) related to your [system's locale setting](http://click.pocoo.org/5/python3/#python-3-surrogate-handling) that are preventing QIIME 2 from running. Can you run the following commands and paste the results in here?

```bash
$ echo $LC_ALL

```

and

```bash
$ echo $LANG

```

Thanks! 🦖

---

<div class="post-metadata">

**Author:** ![bmillerlab](https://forum.qiime2.org/user_avatar/forum.qiime2.org/bmillerlab/32/674_2.png) [@bmillerlab](https://forum.qiime2.org/u/bmillerlab)\
**Post date:** [November 14, 2017, 10:55pm UTC](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814/3 "2017-11-14T22:55:07Z")

</div>

Hello. I ran both commands in my terminal. First without having qiime2 activated and then after I activated the program. Nothing printed out either time.

miller3:~ Paige$ echo $LC\_ALL

miller3:~ Paige$ echo $LANG

miller3:~ Paige$ source activate qiime2-2017.10  
(qiime2-2017.10) miller3:~ Paige$ echo $LC\_ALL

(qiime2-2017.10) miller3:~ Paige$ echo $LANG

(qiime2-2017.10) miller3:~ Paige$

---

<div class="post-metadata">

**Author:** ![bmillerlab](https://forum.qiime2.org/user_avatar/forum.qiime2.org/bmillerlab/32/674_2.png) [@bmillerlab](https://forum.qiime2.org/u/bmillerlab)\
**Post date:** [November 14, 2017, 10:55pm UTC](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814/4 "2017-11-14T22:55:08Z")

</div>

Hello, I tried again after running some qiime2 commands that failed and I got:

(qiime2-2017.10) miller3:test\_emp-single-end-sequences Paige$ echo $LC\_ALL

(qiime2-2017.10) miller3:test\_emp-single-end-sequences Paige$ echo $LANG  
en\_US.UTF-8

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [November 14, 2017, 11:13pm UTC](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814/5 "2017-11-14T23:13:35Z")

</div>

Interesting! Are you changing between different terminal applications (e.g. Apple Terminal vs iTerm) between running those commands?

Another factor that comes to mind is if you have any internationalization helpers enabled on your computer (I am assuming it is a Mac, given the filepaths in your snippet above) --- this could look like alternative language support, or some other keyboard switcher (on the macs i have used, this looks like a little country flag in the task bar up top to let me know what language is enabled on the system).

Either way, something else on your computer seems to be toggling your language/locale settings (QIIME 2 doesn't know how to change those settings, so it seems unlikely that it would be the culprit here...), so you should be able to get around this by manually setting those values when you execute a QIIME 2 command:

```bash
$ source activate qiime2-2017.10
$ export LC_ALL=en_US.UTF-8
$ export LANG=en_US.UTF-8
$ qiime tools import \
  --input-path /Users/Paige/WorkFolder_NBZLJBA6E8Z5_R1clean/otu_table_halandmock_meta_filtered.biom \
  --output-path /Users/Paige/qiime2-testing/out_hal.gza \
  --type FeatureTable[Frequency]

```

or alternatively:

```bash
$ LC_ALL=C.UTF-8 LANG=C.UTF-8 qiime tools import \
  --input-path /Users/Paige/WorkFolder_NBZLJBA6E8Z5_R1clean/otu_table_halandmock_meta_filtered.biom \
  --output-path /Users/Paige/qiime2-testing/out_hal.gza \
  --type FeatureTable[Frequency]

```

which will only temporarily set those values for you. Give one or both of the options a shot and let us know how it goes!

---

<div class="post-metadata">

**Author:** ![puh32](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/p/e95f7d/32.png) [@puh32](https://forum.qiime2.org/u/puh32)\
**Post date:** [November 15, 2017, 4:48pm UTC](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814/6 "2017-11-15T16:48:11Z")

</div>

I'm having the same problem. In response to your question:

$ echo $LANG

$

$echo $LC\_ALL

$

That is, two blank lines. None of the variables are set, I reckon?

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [November 15, 2017, 5:08pm UTC](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814/8 "2017-11-15T17:08:31Z")

</div>

Thanks for chiming in, @puh32! Can you please try [my suggestion above](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814/5) and report back? Thanks! 🦖

---

<div class="post-metadata">

**Author:** ![bmillerlab](https://forum.qiime2.org/user_avatar/forum.qiime2.org/bmillerlab/32/674_2.png) [@bmillerlab](https://forum.qiime2.org/u/bmillerlab)\
**Post date:** [November 16, 2017, 4:36pm UTC](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814/10 "2017-11-16T16:36:36Z")

</div>

Hello, I tried that and it worked!! Woo Hoo!! Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [December 17, 2017, 10:36pm UTC](https://forum.qiime2.org/t/system-locale-settings-and-q2cli/1814/11 "2017-12-17T22:36:47Z")

</div>

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