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
2 | 2100519 | XXXX | 2100519-001 | -122.960000 | 38.250000 |
---|---|---|---|---|---|
3 | 2100519 | XXX | 2100519-002 | -122.950000 | 38.250000 |
4 | 2100519 | XXXXX | 2100519-004 | -122.957714 | 38.257917 |
I do not understand what variable is being referenced before the assignment. Thank you
Solved! Go to Solution.
Thanks for reporting, this bug should be fixed in the next release of the API.