System locale settings and q2cli

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:

(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.

Hi @bmillerlab! I think the “biom file validation” is a bit of a red herring, it looks like there are some issues related to your system’s locale setting that are preventing QIIME 2 from running. Can you run the following commands and paste the results in here?

$ echo $LC_ALL

and

$ echo $LANG

Thanks! :t_rex:

1 Like

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$

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

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:

$ 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:

$ 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!

1 Like

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?

Thanks for chiming in, @puh32! Can you please try my suggestion above and report back? Thanks! :t_rex:

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

2 Likes

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