arcgis-python-api icon indicating copy to clipboard operation
arcgis-python-api copied to clipboard

Unable to list layers for gotten item on Portal 10.9.1 when authenticated using IWA from a Pro 3.2 python environment

Open alex-friant opened this issue 2 years ago • 1 comments
trafficstars

Describe the bug When trying to list layers ("my_hfl.layers") the error results: A general error occurred: 'Response' object has no attribute 'path_url'

To Reproduce Steps to reproduce the behavior: Using jupyter notebook:

from arcgis.gis import GIS
gis = GIS("https://url_to_your/portal") # using IWA
my_hfl = gis.content.get('id_of_your_hosted_feature_layer_in_portal_goes_here')
my_hfl.layers

error:

A general error occurred: 'Response' object has no attribute 'path_url'

Screenshots image

Expected behavior I expect a list to be returned, like this: image

Platform (please complete the following information):

  • Portal 10.9.1
  • Pro 3.2 python environment
  • OS: Windows 2019 Server with IIS
  • Browser : Chrome
  • Python API Version: 2.2.0.1

Additional context This works if my version of Pro is 2.9.10

alex-friant avatar Nov 17 '23 17:11 alex-friant

If it helps, this scenario does work, however:

  • ArcGIS Pro connected to that portal
  • use this parameter to connect: gis = GIS("Pro")

Same versions of everything.

alex-friant avatar Nov 20 '23 17:11 alex-friant