Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Create Replica FS problem #323

Closed
dwaggenspack opened this issue Jan 20, 2017 · 1 comment
Closed

Create Replica FS problem #323

dwaggenspack opened this issue Jan 20, 2017 · 1 comment

Comments

@dwaggenspack
Copy link

ArcRest or ArcRestHelper

Version or date of download

1/19/2017 v3.5.9

Bug or Enhancement

create_replica_fs.py

I created an empty copy of the ArcGIS Online feature and was able to create a replica, but the original will not let me download it.

I believe the script fails due to the large size of the data or a timeout with the request.

I am unsure how to fix the script to deal with this problem, but our feature has attachments and we wish to be able to automate creating a file geodatabase for local use and as a backup.
Alternately, if there was a way to automate the sync to get all the new features collected by the field crew into a replica GDB, that would work too.

Repo Steps or Enhancement details

@spiskula
Copy link

spiskula commented Mar 1, 2017

Hi
I am hitting a problems with creating a replica too. The problem seems to occur with 'createReplica' method of FeatureService class(arcrest\agol\services.py).

I think the issue is that towards the end of the method in this code

            if 'resultUrl' in res:
                dlURL = res["resultUrl"]
            elif 'responseUrl' in res:
                dlURL = res["responseUrl"]

It should actually be / or include different parameter:

            if 'resultUrl' in res:
                dlURL = res["resultUrl"]
            elif 'responseUrl' in res:
                dlURL = res["responseUrl"]
            elif 'URL' in res:
                dlURL = res["URL"]

It seems this is how doco specifies how location (at least of JSON clone) of replica is available on the server
http://resources.arcgis.com/en/help/rest/apiref/fscreatereplica.html

JSON Response Example - Data contains attachments

{"URL": "http://machinename:6080/arcgis/rest/directories/arcgisoutput/Canada/test113c26d11b80f049c09aef1e6c1327641c.json"}

spiskula pushed a commit to spiskula/ArcREST that referenced this issue Mar 1, 2017
achapkowski added a commit that referenced this issue Mar 1, 2017
Fix for extraction of URL with created replica. This is for issue #323
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants