AnsweredAssumed Answered

UnboundLocalError: local variable 'fc_layer_definition' referenced before assignment

Question asked by carterjason on Jan 13, 2018
Latest reply on Jan 19, 2018 by AMani-esristaff

Hello,

 

I'm attempting to add a layer to a map in Jupyter Notebook but am receiving the error:

 

UnboundLocalError: local variable 'fc_layer_definition' referenced before assignment

My code is as follows:

 

from arcgis.gis import *
import pandas as pd
gis = GIS()

df = pd.read_csv('file.csv')
df_layer = gis.content.import_data(df)
m = gis.map()
m.add_layer(df_layer)

 

My dataframe is as follows:

ID         ID2                     NAME                                CODE2          LONGITUDE_MEASURE   LATITUDE_MEASURE

22100519XXXX2100519-001-122.96000038.250000
32100519XXX2100519-002-122.95000038.250000
42100519XXXXX2100519-004-122.95771438.257917

 

 

I do not understand what variable is being referenced before the assignment. Thank you

Outcomes