Esri / ArcREST

python package for REST API (AGS, AGOL, webmap JSON, etc..)
Apache License 2.0
192 stars 155 forks source link

ArcREST/samples/create_replica_fs.py Code no longer functions correctly #274

Closed dwaggenspack closed 7 years ago

dwaggenspack commented 8 years ago

ArcRest or ArcRestHelper

ArcREST/samples/create_replica_fs.py

Version or date of download

07/20/2016

Bug or Enhancement

Created a script using the create_replica_fs.py sample. It was working on 7/08/16, but did not work on/11/2016. I think this has to do with ESRI updating their ArcGIS Online. If this could be fixed, it would be awesome, thanks!

Traceback (most recent call last): File "create_replica_fs_test.py", line 32, in out_path='C:\CollectorImages') File "C:\Python27\ArcGIS10.3\lib\site-packages\arcrest\agol\services.py", line 772, in createReplica proxy_port=self._proxy_port) File "C:\Python27\ArcGIS10.3\lib\site-packages\arcrest\web_base.py", line 485 , in _post resp = request.urlopen(req) File "C:\Python27\ArcGIS10.3\lib\urllib2.py", line 127, in urlopen return _opener.open(url, data, timeout) File "C:\Python27\ArcGIS10.3\lib\urllib2.py", line 410, in open response = meth(req, response) File "C:\Python27\ArcGIS10.3\lib\urllib2.py", line 523, in http_response 'http', request, response, code, msg, hdrs) File "C:\Python27\ArcGIS10.3\lib\urllib2.py", line 448, in error return self._call_chain(_args) File "C:\Python27\ArcGIS10.3\lib\urllib2.py", line 382, in _call_chain result = func(_args) File "C:\Python27\ArcGIS10.3\lib\urllib2.py", line 531, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 500: Internal Server Error

Repo Steps or Enhancement details

MikeMillerGIS commented 7 years ago

Can you check your path, C:\CollectorImages is not a valid python path.

dwaggenspack commented 7 years ago

It is set as the out_path parameter for the replica. The exact script was working before. It only recently stopped. The path exists on the local machine and an overall batch file creates it if it isn't there.

MikeMillerGIS commented 7 years ago

Can you just try to change it to c:/ or put an r in front of it These are valid python paths C:\\CollectorImages C:/CollectorImages r'C:\CollectorImages'

dwaggenspack commented 7 years ago

I have tried with all 3. C:\\CollectorImages was the one used in the file originally.

MikeMillerGIS commented 7 years ago

Can you generate the replica using a browser and rest page of that service?

dwaggenspack commented 7 years ago

I am able to create a replica from the REST page for the service manually. I still need to automate the process though.

Also, thanks for trying to work with me on this. I really do appreciate it!

Anyone else have any ideas as to why this stopped working and how to fix it?

dwaggenspack commented 7 years ago

Just seeing if anyone else is having these problems? Has anyone been able to get this to work recently with an ArcGIS Online non-Public service?

dwaggenspack commented 7 years ago

Am I the only one actually having this problem? I installed a clean arcREST today on a fresh computer install and it is still giving the same errors.