Select to view content in your preferred language

row.setValue

1049
2
11-06-2010 04:46 PM
JosephSheffield
Deactivated User
I have several working scripts that are updating the value of attribute tables using the row.setValue(attribute_Field, New_Value) syntax.

However, with a new script I am writing I get the following error:  "'NoneType' object has no attribute 'setValue'"

Has anyone else run into this problem?  The previous script still run on the same machine.
0 Kudos
2 Replies
NiklasNorrthon
Frequent Contributor
I have several working scripts that are updating the value of attribute tables using the row.setValue(attribute_Field, New_Value) syntax.

However, with a new script I am writing I get the following error:  "'NoneType' object has no attribute 'setValue'"

Has anyone else run into this problem?  The previous script still run on the same machine.

The error message tells you that row isn't a row but None. To find out why, look for assignements saying row = whatever that are executed before the setValue line.
0 Kudos
JosephSheffield
Deactivated User
I figured it out last night.  I was trying to write the attribute in the same for loop as the feature(s) were being added to the feature classes.  To fix it, I created 1 for loop to add the feature geometries and a second for loop, that ran after all the features were added to the feature class, that would write all of the attribute information.
0 Kudos