# Error in rule sanitize\_metadata: ncov workflow

**URL:** <https://nextstrain.discourse.group/t/error-in-rule-sanitize-metadata-ncov-workflow/809>\
**Category:** Help and Getting Started\
**Created:** [November 1, 2021, 6:05am UTC](https://nextstrain.discourse.group/t/error-in-rule-sanitize-metadata-ncov-workflow/809 "2021-11-01T06:05:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jlhudd](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/jlhudd/32/583_2.png) [@jlhudd](https://nextstrain.discourse.group/u/jlhudd)\
**Post date:** [November 3, 2021, 11:08pm UTC](https://nextstrain.discourse.group/t/error-in-rule-sanitize-metadata-ncov-workflow/809/2 "2021-11-03T23:08:42Z")

</div>

Hi @AroobAlhumaidy, I’m not sure if this is the same issue described in [this other post](https://nextstrain.discourse.group/t/sanitize-metadata-py-error-error-expected-after/807), since the log file itself isn’t getting created.

What happens when you run the sanitize metadata command by itself like so from your `nextstrain` Conda environment?

```bash
python3 scripts/sanitize_metadata.py \
  --metadata data/references_metadata.tsv \
  --metadata-id-columns strain name 'Virus name' \
  --database-id-columns 'Accession ID' gisaid_epi_isl genbank_accession \
  --parse-location-field Location \
  --rename-fields 'Virus name=strain' Type=type 'Accession ID=gisaid_epi_isl' 'Collection date=date' 'Additional location information=additional_location_information' 'Sequence length=length' Host=host 'Patient age=patient_age' Gender=sex Clade=GISAID_clade 'Pango lineage=pango_lineage' pangolin_lineage=pango_lineage Lineage=pango_lineage 'Pangolin version=pangolin_version' Variant=variant 'AA Substitutions=aa_substitutions' aaSubstitutions=aa_substitutions 'Submission date=date_submitted' 'Is reference?=is_reference' 'Is complete?=is_complete' 'Is high coverage?=is_high_coverage' 'Is low coverage?=is_low_coverage' N-Content=n_content GC-Content=gc_content \
  --strip-prefixes hCoV-19/ SARS-CoV-2/ \
  --output results/sanitized_metadata_refrences.tsv.xz 2>&1 | tee logs/sanitize_metadata_refrences.txt

```

My first thought is that the `tee` command does not exist or is not behaving like we’d expect.

---

_[View the full topic](https://nextstrain.discourse.group/t/error-in-rule-sanitize-metadata-ncov-workflow/809)._
