Character encoding error from qiime composition ancom

Running ‘qiime composition ancom’ from the Moving Pictures tutorial gives me this error:

"Next step fails: Plugin error from composition: ‘charmap’ codec can’t encode character ‘\ufffd’ in position 944886: character maps to "

I am running under conda (eg. source activate qiime2-2017.10). I believe this character is “Black-diamond-?”. Googling suggests that adding .encode(…) somewhere could help. Grateful for any suggestions.

Hey @hughesd,

I think QIIME 2/Python is just confused about your locale. Does running the following in a terminal before executing that action help?

export LC_ALL=C.UTF-8
export LANG=C.UTF-8

If not, perhaps your metadata file was downloaded with the wrong encoding. Could you run:

file <filepath to metadata.tsv>

to see what it says?

Thanks Evan: Current setting: LANG="en_GB.iso885915" .
export LANG=en_GB.utf8 worked for me.


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