This content has been marked as final. Show 2 replies
enclose your code in the Code block symbol in the html editor (ie #)
This line will fail
env.workspace = "D:\pomme de terre 2\pomme de terre2.gdb"
since you have to use raw notation
env.workspace = r"D:\pomme de terre 2\pomme de terre2.gdb"
or double backslashes or single foreslashes in python
ie env.workspace = "D:\\pomme de terre 2\\pomme de terre2.gdb"
may the spud be with you
One advantage of formatting using code tags like Dan suggests is that others here can see if indenting is the problem. The way it's posted now, it looks like none of the code under your for statements is indented. That will cause a logic error, in that Python thinks you have an empty for loop and just moves sequentially through your code without looping.
On the other hand, maybe your actual code is indented, but it doesn't display in the forum that way if you haven't used code tags. In that case you wouldn't have the no indent problem, but no one here can tell that.