'ascii' codec can't decode byte 0xc6 in position 6158: ordinal not in range(128)

Dear all,
I need to perform the meta-analysis for that I am using QIIME2. For importing the files, i used

qiime tools import \
 --type 'SampleData[SequencesWithQuality]' \
 --input-path casava-18-single-end-demultiplexed \
 --input-format CasavaOneEightSingleLanePerSampleDirFmt \
 --output-path demux-single-end.qza

But i obtained some errors. I need help.

(qiime2-2021.8) [email protected]:~$

qiime tools import \
--type 'SampleData[SequencesWithQuality]' \
--input-path TestRun \
--input-format CasavaOneEightSingleLanePerSampleDirFmt \
--output-path demux-single-end.qza

Traceback (most recent call last):
  File "/home/kmchrf/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/q2cli/builtin/tools.py", line 156, in import_data
    artifact = qiime2.sdk.Artifact.import_data(type, input_path,
  File "/home/kmchrf/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/qiime2/sdk/result.py", line 277, in import_data
    return cls._from_view(type_, view, view_type, provenance_capture,
  File "/home/kmchrf/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/qiime2/sdk/result.py", line 305, in _from_view
    result = transformation(view, validate_level)
  File "/home/kmchrf/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/qiime2/core/transform.py", line 68, in transformation
    self.validate(view, level=validate_level)
  File "/home/kmchrf/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/qiime2/core/transform.py", line 143, in validate
    view.validate(level)
  File "/home/kmchrf/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/qiime2/plugin/model/directory_format.py", line 172, in validate
    getattr(self, field)._validate_members(collected_paths, level)
  File "/home/kmchrf/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/qiime2/plugin/model/directory_format.py", line 102, in _validate_members
    self.format(path, mode='r').validate(level)
  File "/home/kmchrf/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/qiime2/plugin/model/file_format.py", line 25, in validate
    self._validate_(level)
  File "/home/kmchrf/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/q2_types/per_sample_sequences/_format.py", line 284, in _validate_
    self._check_n_records(record_count_map[level])
  File "/home/kmchrf/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/q2_types/per_sample_sequences/_format.py", line 244, in _check_n_records
    for i, record in file_:
  File "/home/kmchrf/miniconda3/envs/qiime2-2021.8/lib/python3.8/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc6 in position 6158: ordinal not in range(128)

An unexpected error has occurred:

  'ascii' codec can't decode byte 0xc6 in position 6158: ordinal not in range(128)

See above for debug info.

Hi @Karthika,

Thanks for reaching out! :qiime2:

This error is typically related to the UTF-8 encoding (either what's set in your machine locally, or in your input file). Check out this forum post for a few possible solutions (setting your machine's default to UTF-8, re-saving your file in UTF-8 format, double checking your file contents), and let us know if you're still running into the same error after giving those things a try!

Cheers :lizard:

1 Like

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