error: "A network source with the specified name does not exist" in Arcpy UpdateCurso
I'm trying to edit an atribute table of a feauture dataset, but the error above appears when I try to execute the code below:
fc = gdb+"\\"+roadsLayer edt = arcpy.da.Editor(gdb) edt.startEditing() WHERE = '"OBJECTID_12" = '+row[0] with arcpy.da.UpdateCursor(fc,["OBJECTID_12","osm_oneway"], WHERE) as cursor: for lin in cursor: txtLog = "Aterar o valor de " + lin[1] + " para " + direcao escreverArquivoLog(logFile,txtLog) lin[1] = direcao cursor.updateRow(lin) cursor.next() edt.stopEditing(True)"roadsLayer" contains the path to the file I want to change. the values are right and if I print the "lin[1]" value in "txtLog", it prints the right value in my log file. So the cursor is in the right position, the problem is in the "updateRow" command (I suppose).
أكثر...
I'm trying to edit an atribute table of a feauture dataset, but the error above appears when I try to execute the code below:
fc = gdb+"\\"+roadsLayer edt = arcpy.da.Editor(gdb) edt.startEditing() WHERE = '"OBJECTID_12" = '+row[0] with arcpy.da.UpdateCursor(fc,["OBJECTID_12","osm_oneway"], WHERE) as cursor: for lin in cursor: txtLog = "Aterar o valor de " + lin[1] + " para " + direcao escreverArquivoLog(logFile,txtLog) lin[1] = direcao cursor.updateRow(lin) cursor.next() edt.stopEditing(True)"roadsLayer" contains the path to the file I want to change. the values are right and if I print the "lin[1]" value in "txtLog", it prints the right value in my log file. So the cursor is in the right position, the problem is in the "updateRow" command (I suppose).
أكثر...