Create Replica using ArcGIS API for Python Error

1056
1
03-13-2019 12:33 PM
DeanChauvin1
New Contributor II

I'm attempting to follow the published guide for ArcGIS API for Python from ESRI.  On the part regarding creating replicas ("Checking Out Data From Feature Layers Using Replicas" section), I'm receiving an error.

Under the "Create A Replica" section, there is a line that attempts to create a replica.

I've got everything else above this executed in Jupyter.  When I run it, I get an error stating:  'FeatureLayerCollection' object has no attribute 'replicas'

I've double checked the code above this.  Yes, the line of code above this has an error ('sr' should be 'search_result').  Outside of this, am I missing something?  There is a good chance there is some fundamental flaw in the examples on this page.  I've found multiple code errors in the guide that I've reported to ESRI.  It feels that the guide itself is working AGAINST me trying to complete it.

Any help would be appreciated.

0 Kudos
1 Reply
DeanChauvin1
New Contributor II

Well, after spending a lot of time trying to figure out what the problem was, I did, indeed, figure it out.

The target FLC did not have the required capabilities.  Yes, per the exercise, I added the Extract capability.  But apparently creating a replica requires other capabilities enabled as well.  The directions didn't really cover this.

I logged into AGO and found the FLC.  I went to the settings for the FLC and enabled every possible editing capability I could find.  Now in Python instead of seeing just "Extract" as a capability, I now see:

So when I attempted to create the replica, it worked with no problem.

0 Kudos