Skip to content

Unable to Access a Table from an Item #2460

@rupertbrowning

Description

@rupertbrowning

Describe the bug
I am using the Python API to access items' tables in a Notebook in ArcGIS Online I receive an error TypeError: 'NoneType' object is not subscriptable due to an underlying permissions error on the item's table.

To Reproduce
Steps to reproduce the behavior:

gis = GIS("home")
item = gis.content.get("<ITEMID>")
table = item.tables[0]

error:

'NoneType' object is not subscriptable

Expected behavior

The documentations says it should work: https://developers.arcgis.com/python/latest/guide/working-with-feature-layers-and-features/

If I use the following code it works fine:

item = gis.content.get("<ITEMID>")
feature_layer_collection = FeatureLayerCollection(item.url, gis)
tables = feature_layer_collection.tables[0]

Note: If I use the erroring code locally in VSCode with gis = GIS("pro"), it works fine.

Platform (please complete the following information):

  • ArcGIS Online - Notebooks
  • ArcGIS version 2.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions