Python script error 3

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?

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.

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.

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.

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) ?