# Error: 'Allow\_choice\_duplicates'

**URL:** <https://forum.getodk.org/t/error-allow-choice-duplicates/21440>\
**Category:** Support\
**Tags:** odk-xlsform-offline, pyxform, odk-xlsform-online\
**Created:** [August 13, 2019, 12:37pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440 "2019-08-13T12:37:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sivan](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/sivan/32/7785_2.png) [@Sivan](https://forum.getodk.org/u/Sivan)\
**Post date:** [August 13, 2019, 12:37pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/1 "2019-08-13T12:37:14Z")

</div>

Hello all,

When converting an excel build form using xlsform online, the following error occurs:  
"There does not seem to be a `allow_choice_duplicates` column header defined in your settings sheet. You must have set `allow_choice_duplicates` setting in your settings sheet to have duplicate choice list names in your choices sheet"

xlsform offline does not identify this error

I have searched all the xlsform/odk documentation about this allow\_choice\_duplicates setting but have not found anything. I have literally followed the instruction by adding a allow\_choice\_duplicates to the settings sheet without succes

I can't think of anyway of reproducing the problem, it happened in 2 separate forms that both used to work fine before.

Can't share the files now due to confidentiality but perhaps anyone has insights?

Thank you in advance,  
Sivan

---

<div class="post-metadata">

**Author:** ![Sivan](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/sivan/32/7785_2.png) [@Sivan](https://forum.getodk.org/u/Sivan)\
**Post date:** [August 13, 2019, 1:12pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/2 "2019-08-13T13:12:12Z")

</div>

When adding a: allow\_choice\_duplicates column with 'yes' underneath, the error makes place for another: "List index out of range"

I just noticed someone else raised the topic some hours ago:

> [@List index out of range](https://forum.getodk.org/t/list-index-out-of-range/21429):
>
> \*\*1. When validating on [http://opendatakit.org/xlsform/](http://opendatakit.org/xlsform/) I get Error: list index out of range on form that were validating and deploying on August 8th. \*\*2. [http://opendatakit.org/xlsform/](http://opendatakit.org/xlsform/) 1.6.0. Forms validate on older versions (offline). Form validates on Kobo and can be deployed. My forms were validating a few days ago and could be deployed/used. The same forms do not get validated anymore and produce an error message. I noticed on github new commits dating of August 12th. Were there major …

---

<div class="post-metadata">

**Author:** ![AL](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/al/32/7981_2.png) [@AL](https://forum.getodk.org/u/AL)\
**Post date:** [August 13, 2019, 2:11pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/3 "2019-08-13T14:11:22Z")

</div>

Dear Sivan, I am experiencing the same problem. Have you managed to fix it?

Bw,

Aure

---

<div class="post-metadata">

**Author:** ![Genevieve\_Audet\_B](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/g/a587f6/32.png) [@Genevieve\_Audet\_B](https://forum.getodk.org/u/Genevieve_Audet_B)\
**Post date:** [August 13, 2019, 9:24am UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/4 "2019-08-13T09:24:08Z")

</div>

\*\*1. When validating on [http://opendatakit.org/xlsform/](http://opendatakit.org/xlsform/) I get Error: list index out of range on form that were validating and deploying on August 8th.

\*\*2. [http://opendatakit.org/xlsform/](http://opendatakit.org/xlsform/) 1.6.0. Forms validate on older versions (offline). Form validates on Kobo and can be deployed.

My forms were validating a few days ago and could be deployed/used. The same forms do not get validated anymore and produce an error message. I noticed on github new commits dating of August 12th. Were there major changes introduced that could produce this error?

Thanks in advance,  
Geneviève

---

<div class="post-metadata">

**Author:** ![Grzesiek2010](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/grzesiek2010/32/2881_2.png) [@Grzesiek2010](https://forum.getodk.org/u/Grzesiek2010)\
**Post date:** [August 13, 2019, 10:31am UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/5 "2019-08-13T10:31:02Z")

</div>

Hi @Genevieve_Audet_B

could you attach your form?

---

<div class="post-metadata">

**Author:** ![pjames](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/pjames/32/8177_2.png) [@pjames](https://forum.getodk.org/u/pjames)\
**Post date:** [August 13, 2019, 11:36am UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/6 "2019-08-13T11:36:13Z")

</div>

Thank you so much for looking into this, and to you Geneviève for raising the issue. I had the same problem (same error message) today on forms that had previously been validated using [http://opendatakit.org/xlsform/](http://opendatakit.org/xlsform/)

In case it is relevant, just to say the other additional (new) error message I got today was regarding "`allow_choice_duplicates` column header defined in your settings sheet". I was able to fix that and so the only error message I get is now relating to the list index out of range.

I too have not made any changes to the forms that were working fine last week, and only discovered the error message when trying to hand over work to a colleague today.

With thanks, Phil

---

<div class="post-metadata">

**Author:** ![Genevieve\_Audet\_B](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/g/a587f6/32.png) [@Genevieve\_Audet\_B](https://forum.getodk.org/u/Genevieve_Audet_B)\
**Post date:** [August 13, 2019, 1:58pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/7 "2019-08-13T13:58:18Z")

</div>

We found the issue. Replace \_ by -

> <https://github.com/getodk/xlsform-online/issues/26>
>
> I'm afraid this commit created another issue. The decoration is converting "choi…ce\_filter" into "choice-filter", but that leads to a "list out of range" error when the "choice\_filter" was active.
> 
> \#24

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [August 13, 2019, 4:06pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/8 "2019-08-13T16:06:38Z")

</div>

Hi all, there seems to be a bug in the latest release of pyxform v0.15.0 that shipped with [ODK XLSForm Online v1.6](https://forum.getodk.org/t/odk-xlsform-online-v1-6/21410) and [ODK XLSForm Offline v1.11](https://forum.getodk.org/t/odk-xlsform-offline-v1-11/21409).

I don't yet know what the problem is, but I've filed the upstream issue at [https://github.com/XLSForm/pyxform/issues/352](https://github.com/XLSForm/pyxform/issues/352) and you can track progress there.

While we try to track down the problem, I've rolled back [http://opendatakit.org/xlsform](http://opendatakit.org/xlsform) to the previous version (v1.5). If you use XLSForm Offline, you can download the previous version (v1.11) [here](https://github.com/opendatakit/xlsform-offline/releases/tag/v1.10.0).

@Ukang_a_Dickson can you help?

---

<div class="post-metadata">

**Author:** ![AL](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/al/32/7981_2.png) [@AL](https://forum.getodk.org/u/AL)\
**Post date:** [August 13, 2019, 8:46pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/9 "2019-08-13T20:46:22Z")

</div>

Thank you for your help. Both the online and offline versions still produce the same error message. Is there another way to convert the xml file, I have always used this online/offline tools so I am not sure about other options.

Thanks a lot.

Aurelia

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [August 14, 2019, 4:55am UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/10 "2019-08-14T04:55:13Z")

</div>

@AL Can you retry the online server? I just made a few changes. Also, what version of the offline app did you try? Finally, can you please share a small form that has this problem? It'd really help track this down.

---

<div class="post-metadata">

**Author:** ![AL](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/al/32/7981_2.png) [@AL](https://forum.getodk.org/u/AL)\
**Post date:** [August 14, 2019, 9:26am UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/11 "2019-08-14T09:26:23Z")

</div>

The new online version now works 🙂 This is life saving since we are starting our survey in Kenya next week!

Thanks again for your help.

Aurelia

---

<div class="post-metadata">

**Author:** ![pjames](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/pjames/32/8177_2.png) [@pjames](https://forum.getodk.org/u/pjames)\
**Post date:** [August 14, 2019, 11:28am UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/12 "2019-08-14T11:28:27Z")

</div>

Many thanks from me too, the XLSForm Online is working again for me. Much appreciated.

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [August 29, 2019, 9:20pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/13 "2019-08-29T21:20:28Z")

</div>

@Genevieve_Audet_B, @pjames, and @Sivan I'm having trouble reproducing the list index out of range issue. Do you have a sample form that you can share so we can fix this problem?

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [September 20, 2019, 7:07pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/14 "2019-09-20T19:07:23Z")

</div>

The reported issues have been fixed in the newest releases of [ODK XLSForm Online v1.6](https://forum.getodk.org/t/odk-xlsform-online-v1-6/21410) and [ODK XLSForm Offline v1.11](https://forum.getodk.org/t/odk-xlsform-offline-v1-11/21409). Thanks to everyone who reported the issue and provided a sample form.

---

<div class="post-metadata">

**Author:** ![Greg](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/greg/32/8717_2.png) [@Greg](https://forum.getodk.org/u/Greg)\
**Post date:** [September 24, 2019, 4:17pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/15 "2019-09-24T16:17:47Z")

</div>

Hi, I think the issue is back today (Sep 24, 2019 @ 10:15 MST) using [https://opendatakit.org/xlsform/](https://opendatakit.org/xlsform/) v.1.6.1 . I'm attempting to convert a XLSform that previously worked, and am getting the exact same error as above:  
"Error: There does not seem to be a `allow_choice_duplicates` column header defined in your settings sheet. You must have set `allow_choice_duplicates` setting in your settings sheet to have duplicate choice list names in your choices sheet"

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [September 24, 2019, 5:36pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/16 "2019-09-24T17:36:22Z")

</div>

@Greg You probably have a duplicate choice name in one or more of your choice lists. This is a new error that was added because choices with the same name will be impossible to differentiate in analysis.

You will need to either remove the duplicate choices or add `allow_choice_duplicates column` in your settings sheet and below that header write `yes`.

This is a not great error message and there is an issue at [https://github.com/XLSForm/pyxform/issues/373](https://github.com/XLSForm/pyxform/issues/373) to improve it.

---

<div class="post-metadata">

**Author:** ![Greg](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/greg/32/8717_2.png) [@Greg](https://forum.getodk.org/u/Greg)\
**Post date:** [September 24, 2019, 5:54pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/17 "2019-09-24T17:54:28Z")

</div>

OK, thanks @yanokwa ! I was just confused because it was the same form as before that worked.

---

<div class="post-metadata">

**Author:** ![ganesh\_rajput](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ganesh_rajput/32/8776_2.png) [@ganesh\_rajput](https://forum.getodk.org/u/ganesh_rajput)\
**Post date:** [September 27, 2019, 6:25pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/18 "2019-09-27T18:25:03Z")

</div>

Issue is still exist in 1.6.1

---

<div class="post-metadata">

**Author:** ![Fabienne35](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/f/dc4da7/32.png) [@Fabienne35](https://forum.getodk.org/u/Fabienne35)\
**Post date:** [October 3, 2019, 6:56pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/19 "2019-10-03T18:56:00Z")

</div>

I experiment this issue with a form which previously works perfectly  
I did not change any thing except the version name  
were can I find the previous version ?

---

<div class="post-metadata">

**Author:** ![LN](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ln/32/1605_2.png) [@LN](https://forum.getodk.org/u/LN)\
**Post date:** [October 3, 2019, 8:08pm UTC](https://forum.getodk.org/t/error-allow-choice-duplicates/21440/20 "2019-10-03T20:08:31Z")

</div>

@ganesh_rajput, @Fabienne35, the problem is almost certainly that you actually have duplicate choice names in one or more of your lists. For example, you might have options with labels "Red" and Blue" that both have the name "2". This is a problem because you won't be able to tell in analysis whether the user selected red or blue. That's what the error is about.

Sometimes this is intentional because you want to do something like give red and blue the same "weight" when doing a calculation later. In that case, you can add a settings sheet (see [http://xlsform.org/en/#settings-worksheet](http://xlsform.org/en/#settings-worksheet)), add a column named `allow_choice_duplicates` and put the value `yes` below that heading.

[Next page](https://forum.getodk.org/t/error-allow-choice-duplicates/21440.md?page=2)
