<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic TPKX TPK Package Creation and Extraction problems in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/tpkx-tpk-package-creation-and-extraction-problems/m-p/1343957#M69091</link>
    <description>&lt;P&gt;Hi guys.&lt;/P&gt;&lt;P&gt;I'm trying to create the tiles packages that can be used for offline purposes.&lt;/P&gt;&lt;P&gt;For the test purposes&amp;nbsp; create the package and then extract on my project via python terminal&lt;/P&gt;&lt;P&gt;I follow the guide for that ,but i'm getting errors while extracting.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone could direct me or tell what i'm doing wrong here?&lt;/P&gt;&lt;P&gt;resources:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/create-map-tile-package.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/create-map-tile-package.htm&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.0/arcpy/classes/extent.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/3.0/arcpy/classes/extent.htm&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/extract-package.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/extract-package.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;steps i perform on ArcGisPro 5.0&amp;nbsp;&lt;/P&gt;&lt;P&gt;crop the map(only one map in project WTP map) (right click on map &amp;gt; clip &amp;gt; clip to extent)&lt;BR /&gt;save project&lt;BR /&gt;open python terminal&lt;/P&gt;&lt;P&gt;p = arcpy.mp.ArcGISProject("C:\\my-progs\\esri\\mysuprtproj\\mysuprtproj.aprx")&lt;BR /&gt;for m in p.listMaps():&lt;BR /&gt;arcpy.management.CreateMapTilePackage(m, "ONLINE", "{}.tpk".format(m.name),&lt;BR /&gt;"PNG32", "2", extent="DISPLAY", min_level_of_detail="1")&lt;BR /&gt;result .\Map.tpkx&lt;/P&gt;&lt;P&gt;when i want to extract and getting error or following methods:&lt;BR /&gt;arcpy.management.ExtractPackage("C:\\my-progs\\esri\\mysuprtproj\\Map.tpkx")&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 12656, in ExtractPackage&lt;BR /&gt;raise e&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 12653, in ExtractPackage&lt;BR /&gt;retval = convertArcObjectToPythonObject(gp.ExtractPackage_management(*gp_fixargs((in_package, output_folder, cache_package, storage_format_type, create_ready_to_serve_format, target_cloud_connection), True)))&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in &amp;lt;lambda&amp;gt;&lt;BR /&gt;return lambda *args: val(*gp_fixargs(args, True))&lt;BR /&gt;arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000735: Processing %d row: Value is required&lt;BR /&gt;ERROR 000735: Processing %d row: Value is required&lt;BR /&gt;Failed to execute (ExtractPackage).&lt;/P&gt;&lt;P&gt;arcpy.management.ExtractPackage(r"C:\my-progs\esri\mysuprtproj\my.tpkx",&lt;BR /&gt;r"C:\my-progs\esri\mysuprtproj\Extracted", "CACHE",&lt;BR /&gt;"COMPACT", "READY_TO_SERVE_CACHE_DATASET")&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 12656, in ExtractPackage&lt;BR /&gt;raise e&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 12653, in ExtractPackage&lt;BR /&gt;retval = convertArcObjectToPythonObject(gp.ExtractPackage_management(*gp_fixargs((in_package, output_folder, cache_package, storage_format_type, create_ready_to_serve_format, target_cloud_connection), True)))&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in &amp;lt;lambda&amp;gt;&lt;BR /&gt;return lambda *args: val(*gp_fixargs(args, True))&lt;BR /&gt;arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000732: Input Package: Dataset C:\my-progs\esri\mysuprtproj\my.tpkx does not exist or is not supported&lt;BR /&gt;Failed to execute (ExtractPackage).&lt;/P&gt;&lt;P&gt;arcpy.management.ExtractPackage("C:\\my-progs\\esri\\mysuprtproj\\Map.tpkx",&lt;BR /&gt;"C:\\my-progs\\esri\\mysuprtproj\\Extracted", None,&lt;BR /&gt;"COMPACT", "READY_TO_SERVE_CACHE_DATASET")&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 12656, in ExtractPackage&lt;BR /&gt;raise e&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 12653, in ExtractPackage&lt;BR /&gt;retval = convertArcObjectToPythonObject(gp.ExtractPackage_management(*gp_fixargs((in_package, output_folder, cache_package, storage_format_type, create_ready_to_serve_format, target_cloud_connection), True)))&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in &amp;lt;lambda&amp;gt;&lt;BR /&gt;return lambda *args: val(*gp_fixargs(args, True))&lt;BR /&gt;arcgisscripting.ExecuteError: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (&lt;A href="http://esriurl.com/support" target="_blank" rel="noopener"&gt;http://esriurl.com/support&lt;/A&gt;) to Report a Bug, and refer to the error help for potential solutions or workarounds.&lt;BR /&gt;Failed to execute (ExtractPackage).&lt;/P&gt;</description>
    <pubDate>Tue, 31 Oct 2023 16:23:45 GMT</pubDate>
    <dc:creator>MateuszJ</dc:creator>
    <dc:date>2023-10-31T16:23:45Z</dc:date>
    <item>
      <title>TPKX TPK Package Creation and Extraction problems</title>
      <link>https://community.esri.com/t5/python-questions/tpkx-tpk-package-creation-and-extraction-problems/m-p/1343957#M69091</link>
      <description>&lt;P&gt;Hi guys.&lt;/P&gt;&lt;P&gt;I'm trying to create the tiles packages that can be used for offline purposes.&lt;/P&gt;&lt;P&gt;For the test purposes&amp;nbsp; create the package and then extract on my project via python terminal&lt;/P&gt;&lt;P&gt;I follow the guide for that ,but i'm getting errors while extracting.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone could direct me or tell what i'm doing wrong here?&lt;/P&gt;&lt;P&gt;resources:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/create-map-tile-package.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/create-map-tile-package.htm&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.0/arcpy/classes/extent.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/3.0/arcpy/classes/extent.htm&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/extract-package.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/extract-package.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;steps i perform on ArcGisPro 5.0&amp;nbsp;&lt;/P&gt;&lt;P&gt;crop the map(only one map in project WTP map) (right click on map &amp;gt; clip &amp;gt; clip to extent)&lt;BR /&gt;save project&lt;BR /&gt;open python terminal&lt;/P&gt;&lt;P&gt;p = arcpy.mp.ArcGISProject("C:\\my-progs\\esri\\mysuprtproj\\mysuprtproj.aprx")&lt;BR /&gt;for m in p.listMaps():&lt;BR /&gt;arcpy.management.CreateMapTilePackage(m, "ONLINE", "{}.tpk".format(m.name),&lt;BR /&gt;"PNG32", "2", extent="DISPLAY", min_level_of_detail="1")&lt;BR /&gt;result .\Map.tpkx&lt;/P&gt;&lt;P&gt;when i want to extract and getting error or following methods:&lt;BR /&gt;arcpy.management.ExtractPackage("C:\\my-progs\\esri\\mysuprtproj\\Map.tpkx")&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 12656, in ExtractPackage&lt;BR /&gt;raise e&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 12653, in ExtractPackage&lt;BR /&gt;retval = convertArcObjectToPythonObject(gp.ExtractPackage_management(*gp_fixargs((in_package, output_folder, cache_package, storage_format_type, create_ready_to_serve_format, target_cloud_connection), True)))&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in &amp;lt;lambda&amp;gt;&lt;BR /&gt;return lambda *args: val(*gp_fixargs(args, True))&lt;BR /&gt;arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000735: Processing %d row: Value is required&lt;BR /&gt;ERROR 000735: Processing %d row: Value is required&lt;BR /&gt;Failed to execute (ExtractPackage).&lt;/P&gt;&lt;P&gt;arcpy.management.ExtractPackage(r"C:\my-progs\esri\mysuprtproj\my.tpkx",&lt;BR /&gt;r"C:\my-progs\esri\mysuprtproj\Extracted", "CACHE",&lt;BR /&gt;"COMPACT", "READY_TO_SERVE_CACHE_DATASET")&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 12656, in ExtractPackage&lt;BR /&gt;raise e&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 12653, in ExtractPackage&lt;BR /&gt;retval = convertArcObjectToPythonObject(gp.ExtractPackage_management(*gp_fixargs((in_package, output_folder, cache_package, storage_format_type, create_ready_to_serve_format, target_cloud_connection), True)))&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in &amp;lt;lambda&amp;gt;&lt;BR /&gt;return lambda *args: val(*gp_fixargs(args, True))&lt;BR /&gt;arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000732: Input Package: Dataset C:\my-progs\esri\mysuprtproj\my.tpkx does not exist or is not supported&lt;BR /&gt;Failed to execute (ExtractPackage).&lt;/P&gt;&lt;P&gt;arcpy.management.ExtractPackage("C:\\my-progs\\esri\\mysuprtproj\\Map.tpkx",&lt;BR /&gt;"C:\\my-progs\\esri\\mysuprtproj\\Extracted", None,&lt;BR /&gt;"COMPACT", "READY_TO_SERVE_CACHE_DATASET")&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 12656, in ExtractPackage&lt;BR /&gt;raise e&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 12653, in ExtractPackage&lt;BR /&gt;retval = convertArcObjectToPythonObject(gp.ExtractPackage_management(*gp_fixargs((in_package, output_folder, cache_package, storage_format_type, create_ready_to_serve_format, target_cloud_connection), True)))&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in &amp;lt;lambda&amp;gt;&lt;BR /&gt;return lambda *args: val(*gp_fixargs(args, True))&lt;BR /&gt;arcgisscripting.ExecuteError: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (&lt;A href="http://esriurl.com/support" target="_blank" rel="noopener"&gt;http://esriurl.com/support&lt;/A&gt;) to Report a Bug, and refer to the error help for potential solutions or workarounds.&lt;BR /&gt;Failed to execute (ExtractPackage).&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 16:23:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/tpkx-tpk-package-creation-and-extraction-problems/m-p/1343957#M69091</guid>
      <dc:creator>MateuszJ</dc:creator>
      <dc:date>2023-10-31T16:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: TPKX TPK Package Creation and Extraction problems</title>
      <link>https://community.esri.com/t5/python-questions/tpkx-tpk-package-creation-and-extraction-problems/m-p/1345697#M69137</link>
      <description>&lt;P&gt;&amp;gt; steps i perform on ArcGisPro 5.0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ArcPro is only on 3.3 currently. Are you using ArcMap? If so you won't have access to .tpkx files. only .tpk files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your errors are also parameter errors which means you're feeding the function invalid parameters, maybe try the workflow using regular GP tools then copy the generated arcpy commands and compare?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 18:15:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/tpkx-tpk-package-creation-and-extraction-problems/m-p/1345697#M69137</guid>
      <dc:creator>HaydenWelch</dc:creator>
      <dc:date>2023-11-03T18:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: TPKX TPK Package Creation and Extraction problems</title>
      <link>https://community.esri.com/t5/python-questions/tpkx-tpk-package-creation-and-extraction-problems/m-p/1345878#M69152</link>
      <description>&lt;P&gt;It helps to format your code and not add forum comments to it. Click the '...' &amp;gt; '&amp;lt;/&amp;gt;' and paste your code in there.&lt;/P&gt;&lt;P&gt;Be explicit with your paths until you know it's working and then you adjust the code for relative paths. Maybe it converts it on its own, but&amp;nbsp; your initial map package name extension is missing the x in the file extension&amp;gt; "{}.tpk".format(m.name) Do you see the file created at: "C:\\my-progs\\esri\\mysuprtproj\\Map.tpkx"?&lt;/P&gt;&lt;P&gt;result .\Map.tpkx &amp;lt;- ? maybe it is from a previous run an the code is creating a Map.tpk at C:\?&lt;/P&gt;&lt;P&gt;arcpy.management.CreateMapTilePackage(m, "ONLINE", "{}.tpk".format(m.name),&lt;BR /&gt;"PNG32", "2", extent="DISPLAY", min_level_of_detail="1")&lt;/P&gt;&lt;P&gt;when i want to extract and getting error or following methods:&lt;BR /&gt;arcpy.management.ExtractPackage("C:\\my-progs\\esri\\mysuprtproj\\Map.tpkx")&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2023 13:55:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/tpkx-tpk-package-creation-and-extraction-problems/m-p/1345878#M69152</guid>
      <dc:creator>StaticK</dc:creator>
      <dc:date>2023-11-04T13:55:28Z</dc:date>
    </item>
  </channel>
</rss>

