I'm having a problem copying data from a shapefile to a feature class using an insert cursor. Here is the part that is causing trouble:
newRows = arcpy.InsertCursor(Target)
sourceRows = arcpy.SearchCursor(Christiansburg)
for source in sourceRows:
neue = newRows.newRow()
neue.setValue(TName, source.getValue(CName))
newRows.insertRow(neue)
It takes data from a field in the source row, and then copies it to the new row. The trouble is, when the source row has a forward slash in it, it fails when I try to do the insert, saying "The row contains a bad value.". If I edit the forward slash out of the source data, it works fine. If I replace the variable with a hardwired string that has a forward slash in it, it also works fine, so I am not 100% sure that it is the forward slash causing the problem. I have tried using the str function on the result of getValue, and it still doesn't work. The field being copied from is street names, and the row causing trouble is a street that changes name. If worst comes to worst, I could simply edit out the forward slash permanently, but I would rather not if I can help it.
Does anyone know what I am doing wrong here?
EDIT: Derped on copy/paste of code snippet. Should be fixed now.