Select to view content in your preferred language

Error when publishing new item to ArcGIS Portal

10-23-2020 02:43 AM
Occasional Contributor



I've created a pythonscript which updates several scene services in ArcGIS Portal by deleting the existing scenes and creating  new ones. I'm using the arcgis python library. The script work fine when working with one group in Portal, but not when publishing to another group. When executing the script, the first items is being published ok, but the following scenes won't be published. I get this error: 

[WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\toda\\AppData\\Local\\Temp\\15\\split.part3'

This is a part of my script:

lineItems ='title:3D{}_lines'.format(kommuneNr))
 if lineItems:
   print("Line exists")
   for i in range(0, len(lineItems)):
     lineItem = lineItems
     itemType = lineItem.type
     print("Deleted "+itemType+" for lines")

 linePackage_item = gis.content.add(item_properties = linePackage_properties,
                                    data = linePackage)
 lineSceneService = linePackage_item.publish()

The traceback shows the error originates in the add_by_part in the gis-module:

File "C:\Users\XXX\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\lib\site-packages\arcgis\gis\", line 3384, in add
File "C:\Users\XXX\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\lib\site-packages\arcgis\gis\", line 3128, in _add_by_part

Does anyone know what might be wrong? Do I have to manually delete the content of the Temp\15 directory?

0 Kudos
0 Replies