I am copying table from source to target. But some of the records of the rows are getting blank in the copied table. My environment ArcGIS Pro 2.x. My script is :
def CopyTables(self, sourceWorkspace,targetworkspace):
arcpy.env.workspace=sourceWorkspace
sourceTableList=arcpy.ListTables()
self.Total = len(sourceTableList)
self.Count=0
arcpy.SetProgressor("Setp", "{0}/{1}".format(self.Count, self.Total), 0, self.Total, 1)
for sourceTable in sourceTableList:
self.Count+=1
arcpy.SetProgressorLabel("Creating table {0} {1}/{2}".format(sourceTable,self.Count, self.Total))
arcpy.Copy_management(os.path.join(sourceWorkspace,sourceTable),os.path.join(targetworkspace,sourceTable))
arcpy.AddMessage("Created table {0} at {1}".format(sourceTable,targetworkspace))
Any idea why this is happening?
arcpy.Copy_management
tool. This tool copies the source item, thus no selections or anything like that. It basically does a 1:1 copy. I couldn't guess why it would be dropping attributes (blank rows). You could get the messages and print them from the copy tool to see if there are any warnings about something gone wrong.r = arcpy.Copy_management(...)
>>print(r.getMessages())