# SetParameter error: TypeError: Multiple targets could match: Set(str), Set(ElementId)

**URL:** <https://forum.dynamobim.com/t/setparameter-error-typeerror-multiple-targets-could-match-set-str-set-elementid/63961>\
**Category:** Revit\
**Tags:** revit, excel, python\
**Created:** [May 14, 2021, 11:48am UTC](https://forum.dynamobim.com/t/setparameter-error-typeerror-multiple-targets-could-match-set-str-set-elementid/63961 "2021-05-14T11:48:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanTheMan](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@DanTheMan](https://forum.dynamobim.com/u/DanTheMan)\
**Post date:** [May 14, 2021, 11:48am UTC](https://forum.dynamobim.com/t/setparameter-error-typeerror-multiple-targets-could-match-set-str-set-elementid/63961/1 "2021-05-14T11:48:41Z")

</div>

Hey everyone,

I have the task to set project paramters for the current Document.  
What i did so far:

1. Get the informations i need in 3 Lists

2. wrote a script that writes the parameter values in the right paramters to the right element. If i execute the script i get an error which said: “TypeError: Multiple targets could match: Set(str), Set(ElementId)”

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/1/515b9af2c684883b1eb0a3066db79cd5e8ec05a0.png)

I have no clue why i am getting this error because i used same script and it worked fine:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/7/e7cb68646908fc348cbb9574f169be4479f52d00.png)

Greets  
Dan

---

<div class="post-metadata">

**Author:** ![SeanP](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/seanp/32/42560_2.png) [@SeanP](https://forum.dynamobim.com/u/SeanP)\
**Post date:** [May 14, 2021, 11:57am UTC](https://forum.dynamobim.com/t/setparameter-error-typeerror-multiple-targets-could-match-set-str-set-elementid/63961/2 "2021-05-14T11:57:02Z")

</div>

What it’s telling you is that one or more of your elements has a Parameter by the name your looking up that wants an ElementId as the value and not a string.

Check to make sure all of your elements have the Parameter with param type Text.

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [May 14, 2021, 1:18pm UTC](https://forum.dynamobim.com/t/setparameter-error-typeerror-multiple-targets-could-match-set-str-set-elementid/63961/3 "2021-05-14T13:18:26Z")

</div>

Hello @DanTheMan  
in addition to @SeanP 's answer it will seem that you have null values in your Parameter values list

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/7/478f761d6453b72bedef40c563cd73598091eefd.jpeg)

---

<div class="post-metadata">

**Author:** ![DanTheMan](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@DanTheMan](https://forum.dynamobim.com/u/DanTheMan)\
**Post date:** [May 14, 2021, 1:57pm UTC](https://forum.dynamobim.com/t/setparameter-error-typeerror-multiple-targets-could-match-set-str-set-elementid/63961/4 "2021-05-14T13:57:27Z")

</div>

thanks so much

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/5/459dc63c6111adf01316b83bb9924a03dfcb5acf.png)

String from Object did the trick

---

<div class="post-metadata">

**Author:** ![DanTheMan](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@DanTheMan](https://forum.dynamobim.com/u/DanTheMan)\
**Post date:** [May 21, 2021, 9:44am UTC](https://forum.dynamobim.com/t/setparameter-error-typeerror-multiple-targets-could-match-set-str-set-elementid/63961/5 "2021-05-21T09:44:46Z")

</div>

I feel bad for opening the topic a again. 😨 @c.poupin @SeanP

I worked on the script and after executing the script i got an error:

> Warnung:IronPythonEvaluator.EvaluateIronPythonScript fehlgeschlagen.  
> Traceback (most recent call last):  
> File “”, line 38, in   
> AttributeError: ‘NoneType’ object has no attribute ‘Set’

It sets the Parameter for the first Element in the list and then i get this error

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/b/7b0ae7abd7a49db6dad113fde94a67e0233e57d6.png)

can someone help again? 😞

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [May 21, 2021, 10:25am UTC](https://forum.dynamobim.com/t/setparameter-error-typeerror-multiple-targets-could-match-set-str-set-elementid/63961/6 "2021-05-21T10:25:34Z")

</div>

hello  
error indicates that a parameter with the given name was not found for this element

---

<div class="post-metadata">

**Author:** ![DanTheMan](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@DanTheMan](https://forum.dynamobim.com/u/DanTheMan)\
**Post date:** [May 21, 2021, 12:06pm UTC](https://forum.dynamobim.com/t/setparameter-error-typeerror-multiple-targets-could-match-set-str-set-elementid/63961/7 "2021-05-21T12:06:56Z")

</div>

thanks for the hint. Found the problem.

1. writes the parameters and takes this as an Input  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/d/ad525cd26547208a11f2600f780a5350e5c370e5.png)
2. set the parameters and takes this as an Input  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/3/c348f21cc4a441795ea30100185ecb15ff8dbce4.png)  
of courese i changes the excel

idiot 🤦‍♂️
