Error publishing Scene Layer Package item

742
0
09-20-2017 09:51 AM
KevinEscalera2
New Contributor II

Hi,

I'm using the ArcGIS API for Python inside a Python Toolbox tool in ArcGIS Pro 2.0. Part of my process is to create a Web Scene Layer Package which I upload to ArcGIS Online without any problems. but when I try to use the publish() function to create the service I always get the following error:

`Traceback (most recent call last):
File "<string>", line 143, in execute
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 4708, 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\__init__.py", line 4951, in _check_publish_status
raise Exception("No job id")
Exception: No job id
Failed to execute (Tool).`

If I try to publish the package item manually from ArcGIS Online it all works just fine.

```
# Uploading scene layer file to ArcGIS online
slpk_properties = {'title': item_title,
'description': 'Scene Layer de la capa: ' + fc,
'tags': 'arcgis, bim',
'type': 'Scene Package'}

layer_scene_pkg_item = gis.content.add(item_properties=slpk_properties, data=sceneLayerPath)
arcpy.AddMessage("Scene Layer package uploaded to AGOL: " + sceneLayerPath)

layer_scene_hosted_service = layer_scene_pkg_item.publish()
arcpy.AddMessage("Scene Layer package published to AGOL: " + sceneLayerPath)
```


I'm using version 1.2.3 of the API.

0 Kudos
0 Replies