AnsweredAssumed Answered

Map Tile Package Publishing Fail

Question asked by JingjingLi on Aug 30, 2017
Latest reply on May 2, 2018 by 96213@charlottenc.gov_charlotte



I've tried using the following script to upload a map tile package and publish it to a hosted tile layer but it failed. The map tile package was successfully uploaded and the hosted tile layer was successfully created. However, it didn't copy the min and max scale to the service so the publishing tile process was failed.


That's the script I used.

from arcgis.gis import GIS

gis = GIS("", "username", "password")
cm = gis.content
itemProperties = {}
data = r"TileMapPackage\PlanningTeamArea_agspro.tpk"
item = cm.add(itemProperties, data=data, folder="test_automation")
if item != None:
    tiledServiceItem = item.publish()
    if tiledServiceItem != None:

that's the error message I got.

Traceback (most recent call last):
  File "D:/Data/Requests/Requests 2017/26_0511_AGOL_Automation_Test/Codes/", line 11, in <module>
    tiledServiceItem = item.publish()
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\", line 4299, in publish
    serviceitem_id = self._check_publish_status(ret, folder)
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\", line 4519, in _check_publish_status
    raise Exception("No job id")
Exception: No job id

Any idea?