<?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: Problem publishing hosted tile layer from tile package using arcgis python api in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-publishing-hosted-tile-layer-from-tile/m-p/1011194#M5350</link>
    <description>&lt;P&gt;Hi Len,&lt;/P&gt;&lt;P&gt;Does it make any difference if you create a TPK file rather than a TPKX? What is the approximate size of this TPKX file that you are working with?&lt;/P&gt;</description>
    <pubDate>Fri, 18 Dec 2020 23:41:41 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-12-18T23:41:41Z</dc:date>
    <item>
      <title>Problem publishing hosted tile layer from tile package using arcgis python api</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-publishing-hosted-tile-layer-from-tile/m-p/1011135#M5347</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a python script that creates a local tile package from an ArcGIS Pro map project containing a single raster, then uploads it to ArcGIS Online (noaa geoplatform), and publishes it as a hosted tile layer. The script uses arcpy.CreateMapTilePackage_management() to create the local tile package (.tpkx), then it uploads to the geoplatform using arcgis.gis.content.add(). When attempting to publish() the item as a hosted tile layer, however, it triggers an error saying that 'file_type' must be provided. When I then use publish({}, file_type='tilePackage'), the hosted tile layer is created, but the tiles are not actually published (I have to publish the tiles manually in ArcGIS Online) and an Exception (No job id) is raised (see below).&lt;/P&gt;&lt;P&gt;I am using ArcGIS Pro 2.4,&amp;nbsp;Python 3.6.12, arcgis&amp;nbsp;1.6.2.&lt;/P&gt;&lt;P&gt;Thanks in advance for any help you can provide.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Len&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="ansi-red-intense-fg ansi-bold"&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;
&lt;SPAN class="ansi-red-intense-fg ansi-bold"&gt;Exception&lt;/SPAN&gt;                                 Traceback (most recent call last)
&lt;SPAN class="ansi-green-intense-fg ansi-bold"&gt;&amp;lt;ipython-input-44-934c5d15bcf0&amp;gt;&lt;/SPAN&gt; in &lt;SPAN class="ansi-cyan-fg"&gt;&amp;lt;module&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="ansi-green-intense-fg ansi-bold"&gt;---&amp;gt; 11&lt;/SPAN&gt;         tile_package_item &lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;=&lt;/SPAN&gt; test_tile_item&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;.&lt;/SPAN&gt;publish&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;(&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;{&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;}&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;,&lt;/SPAN&gt; file_type&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;=&lt;/SPAN&gt;&lt;SPAN class="ansi-blue-intense-fg ansi-bold"&gt;'tilePackage'&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;)&lt;/SPAN&gt; 

&lt;SPAN class="ansi-green-intense-fg ansi-bold"&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py&lt;/SPAN&gt; in &lt;SPAN class="ansi-cyan-fg"&gt;publish&lt;/SPAN&gt;&lt;SPAN class="ansi-blue-intense-fg ansi-bold"&gt;(self, publish_parameters, address_fields, output_type, overwrite, file_type, build_initial_cache)&lt;/SPAN&gt;
&lt;SPAN class="ansi-green-fg"&gt;   8778&lt;/SPAN&gt;             &lt;SPAN class="ansi-green-intense-fg ansi-bold"&gt;return&lt;/SPAN&gt; Item&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;.&lt;/SPAN&gt;_gis&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;,&lt;/SPAN&gt; ret&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;[&lt;/SPAN&gt;&lt;SPAN class="ansi-cyan-intense-fg ansi-bold"&gt;0&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;]&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;[&lt;/SPAN&gt;&lt;SPAN class="ansi-blue-intense-fg ansi-bold"&gt;'serviceItemId'&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;]&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="ansi-green-fg"&gt;   8779&lt;/SPAN&gt;         &lt;SPAN class="ansi-green-intense-fg ansi-bold"&gt;else&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="ansi-green-intense-fg ansi-bold"&gt;-&amp;gt; 8780&lt;/SPAN&gt;             serviceitem_id &lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;=&lt;/SPAN&gt; self&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;.&lt;/SPAN&gt;_check_publish_status&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;(&lt;/SPAN&gt;ret&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;,&lt;/SPAN&gt; folder&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="ansi-green-fg"&gt;   8781&lt;/SPAN&gt;         &lt;SPAN class="ansi-green-intense-fg ansi-bold"&gt;return&lt;/SPAN&gt; Item&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;.&lt;/SPAN&gt;_gis&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;,&lt;/SPAN&gt; serviceitem_id&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="ansi-green-fg"&gt;   8782&lt;/SPAN&gt; 

&lt;SPAN class="ansi-green-intense-fg ansi-bold"&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py&lt;/SPAN&gt; in &lt;SPAN class="ansi-cyan-fg"&gt;_check_publish_status&lt;/SPAN&gt;&lt;SPAN class="ansi-blue-intense-fg ansi-bold"&gt;(self, ret, folder)&lt;/SPAN&gt;
&lt;SPAN class="ansi-green-fg"&gt;   9014&lt;/SPAN&gt;                 &lt;SPAN class="ansi-green-intense-fg ansi-bold"&gt;raise&lt;/SPAN&gt; Exception&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;(&lt;/SPAN&gt;&lt;SPAN class="ansi-blue-intense-fg ansi-bold"&gt;"No job results."&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="ansi-green-fg"&gt;   9015&lt;/SPAN&gt;         &lt;SPAN class="ansi-green-intense-fg ansi-bold"&gt;else&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="ansi-green-intense-fg ansi-bold"&gt;-&amp;gt; 9016&lt;/SPAN&gt;             &lt;SPAN class="ansi-green-intense-fg ansi-bold"&gt;raise&lt;/SPAN&gt; Exception&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;(&lt;/SPAN&gt;&lt;SPAN class="ansi-blue-intense-fg ansi-bold"&gt;"No job id"&lt;/SPAN&gt;&lt;SPAN class="ansi-yellow-intense-fg ansi-bold"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="ansi-green-fg"&gt;   9017&lt;/SPAN&gt; 
&lt;SPAN class="ansi-green-fg"&gt;   9018&lt;/SPAN&gt;         &lt;SPAN class="ansi-green-intense-fg ansi-bold"&gt;return&lt;/SPAN&gt; serviceitem_id

&lt;SPAN class="ansi-red-intense-fg ansi-bold"&gt;Exception&lt;/SPAN&gt;: No job id&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 20:43:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-publishing-hosted-tile-layer-from-tile/m-p/1011135#M5347</guid>
      <dc:creator>Len</dc:creator>
      <dc:date>2020-12-18T20:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem publishing hosted tile layer from tile package using arcgis python api</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-publishing-hosted-tile-layer-from-tile/m-p/1011194#M5350</link>
      <description>&lt;P&gt;Hi Len,&lt;/P&gt;&lt;P&gt;Does it make any difference if you create a TPK file rather than a TPKX? What is the approximate size of this TPKX file that you are working with?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 23:41:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-publishing-hosted-tile-layer-from-tile/m-p/1011194#M5350</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-12-18T23:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem publishing hosted tile layer from tile package using arcgis python api</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-publishing-hosted-tile-layer-from-tile/m-p/1011429#M5352</link>
      <description>&lt;P&gt;Hi Calvin,&lt;/P&gt;&lt;P&gt;No, it doesn't make any difference. I noticed that there is no 'compactTilePackage' file_type, so since in the publish() statement I'm using 'tilePackage' I tried creating a .tpk package file but still get the same result. The tile package is ~5 MB. When I publish the tiles manually in ArcGIS Online, it says it will need 191 MB but I guess that's staging space. The resulting hosted tile layer is also ~ 5 MB in size.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Len&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 14:19:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-publishing-hosted-tile-layer-from-tile/m-p/1011429#M5352</guid>
      <dc:creator>Len</dc:creator>
      <dc:date>2020-12-21T14:19:03Z</dc:date>
    </item>
  </channel>
</rss>

