laptop and a wrench

Bug

Using the fields parameter in GeoAccessor.from_featureclass() encounters "UnboundLocalError: local variable 'cursor_fields' referenced before assignment".

Last Published: May 28, 2019 ArcGIS Pro
Bug ID Number BUG-000121900
SubmittedApril 24, 2019
Last ModifiedJune 5, 2024
Applies toArcGIS Pro
Version found2.3.2
Operating SystemN/A
Operating System VersionN/A
Version Fixed1.9.1
StatusFixed

Workaround

Use the SpatialDataFrame.from_featureclass() instead:

from arcgis.features import SpatialDataFrame

fc = r'<path_to_a_feature_class>'

sdf = SpatialDataFrame.from_featureclass(fc, fields=[<some_fields_from_this_feature_class>])

Steps to Reproduce

Bug ID: BUG-000121900

Software:

  • ArcGIS Pro

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