Hi,
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).
I am using ArcGIS Pro 2.4, Python 3.6.12, arcgis 1.6.2.
Thanks in advance for any help you can provide.
Cheers,
Len
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-44-934c5d15bcf0> in <module>
---> 11 tile_package_item = test_tile_item.publish({}, file_type='tilePackage')
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py in publish(self, publish_parameters, address_fields, output_type, overwrite, file_type, build_initial_cache)
8778 return Item(self._gis, ret[0]['serviceItemId'])
8779 else:
-> 8780 serviceitem_id = self._check_publish_status(ret, folder)
8781 return Item(self._gis, serviceitem_id)
8782
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py in _check_publish_status(self, ret, folder)
9014 raise Exception("No job results.")
9015 else:
-> 9016 raise Exception("No job id")
9017
9018 return serviceitem_id
Exception: No job id