Error with Python

Excuse me are all 'start … with the python script I get the following error:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
File “”, line 11
sum = Math.Pow(X[i],2) + Math.Pow (Y[i],2) + Math.Pow(C,2)

SyntaxError: expected an indented block

I do not understand … can someone help?dynamo nota


If you use small letters for all your math calls and the same size on your variables, it should work.


Thanks Jostein Olsendynamo nota
I tried as you say, but should not be
upload image … is right?
Thanks again for your cooperation

Hi Alex,

@Olsen is right regarding the capitalization of the functions, also of your variables. You have to pay attention to this because Python is Case sensitive.

But the error that you’ve got is about indentation. Usually, when you are using a statement such as “for”, “if”, etc. you have to use indentation. In your case, Python doesn’t know what to execute inside the “for” loop. If you take a look at the picture of Olsen you will see that the next lines after “for” loop have a space at the beginning of the line (usually you can use the tab key). This space is the indent and the massage that you’ve got is saying that an indented line is expected.

Hope this is helpfully!


Also, to let Python go all together and use the built in design script language is more straight forward:


Thanks Lucian, Thanks Jostein
everything works fine
Again, thank you for your cooperation