Arcpy ExportTileCache_management error

Discussion created by throwaway12 on Mar 8, 2016
Latest reply on Mar 12, 2016 by rastrauch


We are trying to create a .tpk file from a tile cache folder using arcpy and arcgis 10.1. We created the tile cache in python using “arcpy.ManageTileCache_management” and this works great.  arcpy.ManageTileCache_management produces a cache folder with the expected resolution level folders; ie, L00- L14. However, when we call ExportTileCache immediately after from the same python script and use the tile cache folder as the source we get the following error:


ERROR:root:ERROR 999999: Error executing function. The workspace is not connected. Failed to execute (ExportTileCache)


Sample code:


arcpy.ExportTileCache_management("C:\Users\test\AppData\Roaming\tpkgen\tpkgen_cache", “C:\Users\test\AppData\Roaming\tpkgen”, "tpkgen_result", "TILE_PACKAGE", "COMPACT", scales)


Where tpkgen_cache is the tile cache created using ManageTileCache.

As a side note we can run the ExportTilePackage from ArcToolBox using tpkgen_cache as the input it works fine and produces a .tpk file as expected.


Does anyone have insight into this?