Select to view content in your preferred language

Permissions issue in accessing geoenrichment

06-07-2021 01:35 PM
New Contributor


I am new to ESRI/ArcGIS API for python. I am facing below error when accessing enrich method in geoenrichment module

from arcgis.gis import GIS
from arcgis.geoenrichment import enrich

gis = GIS("", username = username, password = password)

analysis_variables = [
    'TOTPOP_CY',  # Population: Total Population (Esri)
    'DIVINDX_CY', # Diversity Index (Esri)
    'AVGHHSZ_CY', # Average Household Size (Esri)
    'MEDAGE_CY',  # Age: Median Age (Esri)
    'MEDHINC_CY', # Income: Median Household Income (Esri)
    'BACHDEG_CY', # Education: Bachelor's Degree (Esri)

usa = Country.get('US')
zip1 = usa.subgeographies.states['California'].zip5['90018']
zip2 = usa.subgeographies.states['California'].zip5['90023']
zip3 = usa.subgeographies.states['California'].zip5['90035']

enrich_df = enrich(study_areas=[zip1, zip2, zip3], analysis_variables=analysis_variables)


Below is the error I am getting. Please let me know what is the problem here and how to resolve this.

Exception: You do not have permissions to use this resource.
(Error Code: 401)


0 Kudos
1 Reply
Esri Regular Contributor


"To use the Enrich tool, you must be signed in to ArcGIS Online, and your account must have GeoEnrichment privileges." Enrich toll uses credits. 

0 Kudos