Select to view content in your preferred language

Problem with PortalUploadSettings

03-07-2017 10:26 AM
New Contributor III


I am using PortalUploadSettings to automate the upload .spk files to ArcGIS online according

to the example in the documents:

        uploadsettings = PortalUploadSettings()
        uploadsettings.setDescription("RPK from apidoctest script cga0")

but CityEngine pops up a form asking for the filename even when I have done "setFile".

Have others been successful using PortalUploadSettings?

0 Kudos
2 Replies
Esri Regular Contributor

Hi Robert,

in an standard CityEngine installation the RPK referenced in the example does not exist.
This is the reason the "Select file for upload..." dialog pops up.
Please verify in your script, that the file intended for upload does exist by using:

import os.path 

0 Kudos
New Contributor III


I used the example as a reference and used my own file name

I used the "os.path.exists" check and it came back true, but the popup form still came up.

In the meantime, I've worked around this problem by doing a system call to a script that does the equivalent POST to arcGIS online.  This works out even better, because I also want to create a scene layer from the scene layer package and share it with the public.


0 Kudos