I tried to change a layer's dataSource in a gdb, and to different feature class dataset in another gdb. It took long time that I grasped replaceDataSource needs only gdb path. Any dataset name is not necessary. (ex) if you want to change " fc1 in a.gdb\datasetA " to " fc2 in b.gdb\datasetB " C:\a.gdb\datasetA\fc1 -> C:\b.gdb\datasetB\fc2 you need to prepare 3 informations : 1. where to change : "C:\b.gdb" dataset name is not necessary !! 2. type of workspace: "FILEGDB_WORKSPACE" 3. name of datasource : "datasetB" if this is RASTER, it needs an extension of the file(RASTER_WORKSPACE), but is SHAPEFILE(SHAPEFILE_WORKSPACE), it dont need an extention. then, they apply to the function: lyr.reaplceDataSource( 1 , 2 , 3 ) It may not be an answer you needs. I hope that it will be helpful for you. references: 1 [1] arcpy - Using Feature Dataset with ReplaceDataSource gives ValueError: Layer: Unexpected error? - Geographic Information… 3 [2] python - Arcpy's replaceDataSource Error - Geographic Information Systems Stack Exchange
... View more