# Odkmeta: column header type not found. invalid type() suboption. invalid survey() option

**URL:** <https://forum.getodk.org/t/odkmeta-column-header-type-not-found-invalid-type-suboption-invalid-survey-option/15564>\
**Category:** Support\
**Tags:** odk-meta\
**Created:** [October 9, 2018, 5:37pm UTC](https://forum.getodk.org/t/odkmeta-column-header-type-not-found-invalid-type-suboption-invalid-survey-option/15564 "2018-10-09T17:37:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuliab](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/y/7bcc69/32.png) [@yuliab](https://forum.getodk.org/u/yuliab)\
**Post date:** [October 9, 2018, 5:37pm UTC](https://forum.getodk.org/t/odkmeta-column-header-type-not-found-invalid-type-suboption-invalid-survey-option/15564/1 "2018-10-09T17:37:39Z")

</div>

Hello,

I am having an issue described in a previous post, getting the following error:

column header type not found  
invalid type() suboption  
invalid survey() option

The command I am using is just:

odkmeta using odkmetado, csv("$data\baseline\_180909.csv") survey("$survey\survey.csv") choices("$survey\choices.csv") replace

I was not sure if my .csv files had any non-ASCII characters, so I tried stripping them (not sure if that was successful). I am attaching my [survey.csv](https://getodk.b-cdn.net/uploads/default/original/2X/2/2932c1aeb802b2f412c2a006211d67f4368eeb2f.csv) (77.4 KB) and [choices.csv](https://getodk.b-cdn.net/uploads/default/original/2X/f/f90e5199991542de3ee2d1b43fb960d2e2138128.csv) (44.1 KB) files for your reference. Is it still the encoding or could the issue be something else? Appreciate your help - I am really not sure what my next steps are.

---

<div class="post-metadata">

**Author:** ![Matthew\_White](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/matthew_white/32/1654_2.png) [@Matthew\_White](https://forum.getodk.org/u/Matthew_White)\
**Post date:** [October 10, 2018, 1:18pm UTC](https://forum.getodk.org/t/odkmeta-column-header-type-not-found-invalid-type-suboption-invalid-survey-option/15564/2 "2018-10-10T13:18:29Z")

</div>

Hi @yuliab! When you get a chance, please [introduce yourself here](https://forum.getodk.org/t/-/6671). Thanks for uploading `survey.csv` and `choices.csv`, as that definitely aids debugging.

When I run `odkmeta` for `survey.csv` and `choices.csv`, I actually see a slightly different error message:

```plaintext
column header label not found
invalid label() suboption
invalid survey() option
r(111);

```

This error message is issued because `survey.csv` does not contain a column named `label`. However, you can specify a different column using suboption `label()`:

```auto
odkmeta using odkmetado, ///
	csv("$data/baseline_180909.csv") ///
	survey("$survey/survey.csv", label(label:english)) ///
	choices("$survey/choices.csv", label(label:english)) ///
	replace

```

See the help file for more details about this suboption.

Also, am I right that you added the first column of `survey.csv` and that it just contains the row number? If that's the case, you should be able to (and will likely need to) remove that column before specifying `survey.csv` to `odkmeta`.

When I take these steps, I'm able to run `odkmeta` without error. Given that `type` is the first column once the row-number column is removed, I think that means that there is no issue with Unicode characters.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![kokozaw](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/k/46a35a/32.png) [@kokozaw](https://forum.getodk.org/u/kokozaw)\
**Post date:** [January 4, 2019, 9:09am UTC](https://forum.getodk.org/t/odkmeta-column-header-type-not-found-invalid-type-suboption-invalid-survey-option/15564/3 "2019-01-04T09:09:30Z")

</div>

I also have the following messages after running odkmeta:

column header label not found  
invalid label() suboption  
invalid survey() option

Could you suggest the possible solutions?

Ko Zaw  
University of Public Health  
Yangon

---

<div class="post-metadata">

**Author:** ![Matthew\_White](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/matthew_white/32/1654_2.png) [@Matthew\_White](https://forum.getodk.org/u/Matthew_White)\
**Post date:** [January 4, 2019, 4:18pm UTC](https://forum.getodk.org/t/odkmeta-column-header-type-not-found-invalid-type-suboption-invalid-survey-option/15564/4 "2019-01-04T16:18:06Z")

</div>

Hi @kokozaw! The most common reason for this error message is an encoding issue. See the discussion [here](https://forum.getodk.org/t/odkmeta-column-header-type-not-found/10617/4) and [here](https://forum.getodk.org/t/odkmeta-error-column-header-not-found/16976) and let us know if that helps.

---

<div class="post-metadata">

**Author:** ![kokozaw](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/k/46a35a/32.png) [@kokozaw](https://forum.getodk.org/u/kokozaw)\
**Post date:** [January 4, 2019, 5:00pm UTC](https://forum.getodk.org/t/odkmeta-column-header-type-not-found-invalid-type-suboption-invalid-survey-option/15564/5 "2019-01-04T17:00:27Z")

</div>

Dear Matthew White

Thank you for your response. I will try to solve the problem as you advised.

Regards

Ko Ko Zaw

---

<div class="post-metadata">

**Author:** ![hiwot\_mekonen](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/hiwot_mekonen/32/7852_2.png) [@hiwot\_mekonen](https://forum.getodk.org/u/hiwot_mekonen)\
**Post date:** [August 24, 2019, 9:34am UTC](https://forum.getodk.org/t/odkmeta-column-header-type-not-found-invalid-type-suboption-invalid-survey-option/15564/6 "2019-08-24T09:34:09Z")

</div>

Dear Team,

So, 8 months later, I am using ODK collect and testing to export my data from ONA server and use odkmeta to generate the Stata dofile; but I kept getting that exact error message;

column header name not found  
invalid name() suboption  
invalid choices() option

I read the discussions here and tried some of the recommendations but so far I have not fixed it. I am using stata 15 in case that has something to do with it. Could someone please help me fix this issue?

Thanks all for the help!  
Hiwot

---

<div class="post-metadata">

**Author:** ![Matthew\_White](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/matthew_white/32/1654_2.png) [@Matthew\_White](https://forum.getodk.org/u/Matthew_White)\
**Post date:** [August 26, 2019, 8:09pm UTC](https://forum.getodk.org/t/odkmeta-column-header-type-not-found-invalid-type-suboption-invalid-survey-option/15564/7 "2019-08-26T20:09:57Z")

</div>

Welcome @hiwot_mekonen! When you get a chance, please [introduce yourself here](https://forum.getodk.org/t/-/6671). Doing so helps build community!

`odkmeta` creates a do-file that imports submission data that matches the ODK Briefcase [export CSV format](https://github.com/opendatakit/briefcase/blob/master/docs/export-format.md). I'm not sure whether data exports that you prepare from within Ona match this format, though I seem to recall that they don't. However, you should be able to connect ODK Briefcase to Ona, then export your data using ODK Briefcase; you can then use the `odkmeta` do-file to import the resulting data.

However, first you need to use `odkmeta` to create the do-file, and it seems that you are running into an issue in this step. I've used `odkmeta` with Stata 15, so I don't think that's the cause. (Stata also has excellent version control, such that `odkmeta` should continue working in new versions of Stata.)

What is the full `odkmeta` command that you are running? Are you able to share your XLSForm?

---

<div class="post-metadata">

**Author:** ![jntivuguruzwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jntivuguruzwa/32/9338_2.png) [@jntivuguruzwa](https://forum.getodk.org/u/jntivuguruzwa)\
**Post date:** [November 8, 2019, 1:21pm UTC](https://forum.getodk.org/t/odkmeta-column-header-type-not-found-invalid-type-suboption-invalid-survey-option/15564/8 "2019-11-08T13:21:34Z")

</div>

Hello,

I am Jado, working on a HAPIN Trial project.  
I am facing with the same issue.  
I wanted to share with you an issue I am facing while trying to work with odkmeta.  
In fact, while running the odkmeta dofile, I am getting the following error message:

column header type not found  
invalid type() suboption  
invalid survey() option

Here are csv files that I am using:

- Survey sheet: [supervisor\_qc\_checklist\_NEW\_survey\_sheet.csv](https://forum.getodk.org/uploads/short-url/kk46X8CNtJ9ab4WOQBSDmQLMeV4.csv) (128.6 KB)
- Choices sheet: [retailer\_inventory\_survey\_v1\_choices\_sheet.csv](https://forum.getodk.org/uploads/short-url/kar193B9ydLhuUegOCP4OS1bCdG.csv) (117.5 KB)

I would appreciate if you can help.

Thanks,  
Jado

---

<div class="post-metadata">

**Author:** ![Matthew\_White](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/matthew_white/32/1654_2.png) [@Matthew\_White](https://forum.getodk.org/u/Matthew_White)\
**Post date:** [November 15, 2019, 5:43pm UTC](https://forum.getodk.org/t/odkmeta-column-header-type-not-found-invalid-type-suboption-invalid-survey-option/15564/9 "2019-11-15T17:43:49Z")

</div>

Hi @jntivuguruzwa, and welcome to the ODK forum! When you have a chance, I'd encourage you to [introduce yourself here](https://forum.getodk.org/t/-/6671). Doing so helps build community!

It looks like your survey CSV file contains non-ASCII characters, specifically `’`, `“`, `”`, and `•`. As long as those characters only appear in the label column, you should be able to remove them or replace them with corresponding ASCII characters (for example, replacing `’` with `'` and `“` and `”` with `"`).

For more discussion about `odkmeta`, Unicode, and non-ASCII characters, see the discussion [here](https://forum.getodk.org/t/odkmeta-column-header-type-not-found/10617/4) and [here](https://forum.getodk.org/t/odkmeta-error-column-header-not-found/16976).

Hope this helps!
