cannot concatenate str and list objects

المشرف العام

Administrator
طاقم الإدارة
i've tried including str() functions in a couple places as well as .join in the tool's out data parameter but end up generating other errors. If I don't use rList variable in the Rename function and use the rasters variable instead, the script will rename the first file in the directory but then say i1986_xxx already exists. Any ideas?

arcpy.env.workspace = DIRECTORYrList = arcpy.ListRasters()for rasters in rList: arcpy.Rename_management(rList, "I1986_" + rList[0:3])

أكثر...
 
أعلى