laptop and a wrench

Bug

There are performance issues when using the 'size' property of the content class in ArcGIS API for Python.

Last Published: September 23, 2021 ArcGIS API for Python
Bug ID Number BUG-000117150
SubmittedOctober 1, 2018
Last ModifiedJune 5, 2024
Applies toArcGIS API for Python
Version found1.4.1
Operating SystemWindows OS
Operating System Version2016 64 Bit
StatusWill Not Be Addressed

Additional Information

This is by design since the size is normally incorrect. The item class states to erase the property value in the __init__ of the item.

Workaround

The workaround is to assign the item in the loop to a new variable:

from arcgis.gis import GIS

gis = GIS("<portal/ArcGIS Online>","<user>","<password>")

content = gis.content.search(query="")

for c in content:

test = c

print(test.size)

Steps to Reproduce

Bug ID: BUG-000117150

Software:

  • ArcGIS API for Python

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options