<?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 Re: Arcpy ExportTileCache_management error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-exporttilecache-management-error/m-p/651231#M50698</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i don't have access to test right now, but try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;arcpy.ExportTileCache_management(r"C:\Users\test\AppData\Roaming\tpkgen\tpkgen_cache", r“C:\Users\test\AppData\Roaming\tpkgen”, "tpkgen_result", "TILE_PACKAGE", "COMPACT", scales)&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;Notice the small&amp;nbsp; r before the path strings.&amp;nbsp;&amp;nbsp;&amp;nbsp; For one discussion of various ways to write paths, see this poll's comments &lt;A __default_attr="2285" __jive_macro_name="polls" class="jive_macro_polls jive_macro" data-orig-content="How do you write Python path strings?" href="https://community.esri.com/"&gt;&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;if that doesnt work, since you said the tool works, after running it, go to you results tab, right click on the completed to and copy the Python snippet.&amp;nbsp; Paste this into you Python script (or window) to see the format the command it wanting.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Mar 2016 02:39:16 GMT</pubDate>
    <dc:creator>RebeccaStrauch__GISP</dc:creator>
    <dc:date>2016-03-13T02:39:16Z</dc:date>
    <item>
      <title>Arcpy ExportTileCache_management error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-exporttilecache-management-error/m-p/651230#M50697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;Hello,&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;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.&amp;nbsp; 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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;ERROR:root:ERROR 999999: Error executing function. The workspace is not connected. Failed to execute (ExportTileCache)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;Sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;arcpy.ExportTileCache_management("C:\Users\test\AppData\Roaming\tpkgen\tpkgen_cache", “C:\Users\test\AppData\Roaming\tpkgen”, "tpkgen_result", "TILE_PACKAGE", "COMPACT", scales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;Where tpkgen_cache is the tile cache created using ManageTileCache.&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;Does anyone have insight into this?&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2016 18:15:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-exporttilecache-management-error/m-p/651230#M50697</guid>
      <dc:creator>JustinMoberg</dc:creator>
      <dc:date>2016-03-08T18:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy ExportTileCache_management error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-exporttilecache-management-error/m-p/651231#M50698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i don't have access to test right now, but try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;arcpy.ExportTileCache_management(r"C:\Users\test\AppData\Roaming\tpkgen\tpkgen_cache", r“C:\Users\test\AppData\Roaming\tpkgen”, "tpkgen_result", "TILE_PACKAGE", "COMPACT", scales)&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;Notice the small&amp;nbsp; r before the path strings.&amp;nbsp;&amp;nbsp;&amp;nbsp; For one discussion of various ways to write paths, see this poll's comments &lt;A __default_attr="2285" __jive_macro_name="polls" class="jive_macro_polls jive_macro" data-orig-content="How do you write Python path strings?" href="https://community.esri.com/"&gt;&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;if that doesnt work, since you said the tool works, after running it, go to you results tab, right click on the completed to and copy the Python snippet.&amp;nbsp; Paste this into you Python script (or window) to see the format the command it wanting.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Mar 2016 02:39:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-exporttilecache-management-error/m-p/651231#M50698</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-03-13T02:39:16Z</dc:date>
    </item>
  </channel>
</rss>

