I am trying to download a hosted layer from our portal and save to a file geodatabase.
Following Using ArcPy to copy a portal feature service to a fgdb feature class:
I've tried:
from arcgis.gis import GIS
from arcgis.features import FeatureLayer
url_gis = r'https://maps.something.se/arcgis/home/'
url_fl = r'https://maps.something.se/server/rest/services/Hosted/service_asfdasfadsfasafdsafdsafdsafsafas653757237adfagdagd.'
user = "username"
pwd = "password"
#fgdb = # path to file geodatabase
#fc = # name of feature class
gis = GIS(url_gis, user, pwd)
fl = FeatureLayer(url_fl)
fs = fl.query() #No errors until this line
builtins.Exception: A general error occurred: maximum recursion depth exceeded while calling a Python object
Am I on the right track with this or are there some easier way to download the data using ArcPy?