# Python script error 3

**URL:** <https://forum.dynamobim.com/t/python-script-error-3/66949>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [August 8, 2021, 7:17pm UTC](https://forum.dynamobim.com/t/python-script-error-3/66949 "2021-08-08T19:17:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yousrakadcha78](https://avatars.discourse-cdn.com/v4/letter/y/e19adc/32.png) [@yousrakadcha78](https://forum.dynamobim.com/u/yousrakadcha78)\
**Post date:** [August 8, 2021, 7:17pm UTC](https://forum.dynamobim.com/t/python-script-error-3/66949/1 "2021-08-08T19:17:07Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/0/10eb21447de2fb9a884cfc40fbd15228154ba1ee.png)  
Hey, I’m trying to run a python node in dynamo, but I keep getting the following error:Avertissement:IronPythonEvaluator.EvaluateIronPythonScript l’opération a échoué.  
unexpected token ‘i’

does someone have an idea about the origin of the error?

---

<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:** [August 8, 2021, 8:08pm UTC](https://forum.dynamobim.com/t/python-script-error-3/66949/2 "2021-08-08T20:08:02Z")

</div>

Because you have i = IN[2] and also your for statement. Change one of those to be different than the other. Also, looks like your indents are not right either. The lines after the for statement should have a tab indent.

---

<div class="post-metadata">

**Author:** ![yousrakadcha78](https://avatars.discourse-cdn.com/v4/letter/y/e19adc/32.png) [@yousrakadcha78](https://forum.dynamobim.com/u/yousrakadcha78)\
**Post date:** [August 8, 2021, 10:27pm UTC](https://forum.dynamobim.com/t/python-script-error-3/66949/3 "2021-08-08T22:27:24Z")

</div>

I have tried to have i in a for statement only and I got the same error, then I thought I may need to define it that’s why I attributed the value of IN[2] to it.

---

<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:** [August 8, 2021, 11:20pm UTC](https://forum.dynamobim.com/t/python-script-error-3/66949/4 "2021-08-08T23:20:45Z")

</div>

On second thought, just take everything after the += side of the sqlCommand and place that in a code block. You can then wire up tableName and stringOfFields to concatenate your commands.

---

<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:** [August 9, 2021, 9:19am UTC](https://forum.dynamobim.com/t/python-script-error-3/66949/5 "2021-08-09T09:19:04Z")

</div>

Hello @yousrakadcha78  
For better help, can you copy and paste your code with the \</\> tags and add watch nodes at the input of your Python node in order to view the incoming data (and redo a screenshot) ?
