AnsweredAssumed Answered

How to set "map description" parameter in arcpy.PackageMap_management ?

Question asked by kaustav123 on Feb 2, 2017
Latest reply on Feb 3, 2017 by kaustav123

I recently started using arcpy to handle batch tasks for arcgis. I am trying to run the arcpy packagemap_management tool to batch export a bunch of mxds inside a folder.


This is what I am running now:


>>> import os
import arcpy

arcpy.env.overwriteOutput = True
arcpy.env.workspace = "C:\ABC\DirectoryToMxd"

for mxd in arcpy.ListFiles("*.mxd"):
print ("Packaging: {0}".format(mxd))
arcpy.PackageMap_management(mxd, os.path.splitext(mxd)[0] + '.mpk', "PRESERVE", "CONVERT_ARCSDE", "#", "ALL")

Packaging: Test.mxd
Runtime error Traceback (most recent call last): File "<string>", line 9, in <module> File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\", line 8197, in PackageMap raise e ExecuteError: #ERROR 001117: Map description property must be set Failed to execute (PackageMap).


From the error , it seems the code is working but due to the mandatory requirement for map description during mpk export ,it is throwing an error. I checked geonet doc and did not find any parameter to set "description". It only supports summary and tags through command line. 



Can someone please help me fix this? Is there a hidden parameter I can use to set the map description for all the exports?