Portal 10.7 can't add Scene Layer Package from portal page

3457
10
06-24-2019 10:49 AM
DavidColey
Frequent Contributor

Hi - I have been able to add and publish a global scene layer package to ArcGIS online through the 'Add Item' button.  When I try to add the same layer package to Portal at 10.7, the 'Add item' method fails (regardless of browser) with a 'cannot write to file' error, even thought the item is clearly visible in Windows Explorer in my D;\arcgisportal\content\items directory.

I am able to add the package from Pro 2.3.3 using the 'share package' tool.

I am able to add the item using the 1.6.1 API item.add method:

import sys, os, arcpy, time, smtplib
from arcpy import env
from arcgis.gis import GIS
arcpy.SetLogHistory(False)
env.configKeyword= "DEFAULTS"
env.overwriteOutput = True
gis = GIS("https://myportal.scgs.net/portal", "myUserName", "myPassword")
slpkPath = r"V:\SarcoBuildingExtract"
thumbPath = r"V:\IconsImages\pdfIcon.png"
slpkExtent = '-82.580256,26.922512,-82.064256,27.438512'
slpkTypes = '[3D,ArcGIS Pro,ArcGIS Server,Scene,Scene Package,slpk]'
pub_params = '[3DObject,ArcGIS Server,Data,Scene Service,Service,Hosted Service]'

try:
    for item in os.listdir(slpkPath):
    slpkFile = os.path.join(slpkPath, item)
    #print (item)
    if (item == 'PortalFootprintScene.slpk'):
       print (item)
       slpkProperties={'type':'Scene Package','typeKeywords':slpkTypes,
       'title':'PortalBuildingScenePackage2','snippet':'County Builiding Multipatch Features','description':'County Builiding Multipatch Features','tags': 'Planning', 'extent':slpkExtent}
       slpkItem = gis.content.add(item_properties=slpkProperties, data=slpkFile,      thumbnail=thumbPath, folder='SceneLayers')
       print (slpkProperties)

      slpkItem.publish(publish_parameters=pub_params,file_type='scenepackage',build_initial_cache=True)
      print ('itemPublihed')

except Exception:
 # If an error occurred, print line number and error message
 import traceback, sys
 tb = sys.exc_info()[2]
 e = sys.exc_info()[1]
 print(e.args[0])
 print ("Line %i" % tb.tb_lineno)
 message = message + "\n" + "Line %i" % tb.tb_lineno
 message = message + "\n" + str(e)‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

In either case, whether adding the item from the api or from the share package module in Pro, the Publish fails with the API error: 'Cannot determine service type'  even though I am adding the typeKeywords.  In either case, Portal should be able to publish the hosted scene layer whether through the api or through the portal Content tab page.

10 Replies
SianDoherty1
New Contributor III

Does anyone know the bug number for this? I have a support case open with ESRI Australia regarding this particular issue and we are just getting absolutely nowhere. It would be good if i could go back to them and say well actually it's been identified as a bug in 10.7.1 - can you confirm this is fixed in 10.8.