I am attempting to use the sync_replicated_items
class from the #ArcGIS API for Python to synchronize two services, one on AGOL and one on an internal portal but receive a Runtime error code 500. I created the internal portal feature service using the create_replica_item
class, and both have the same replica name and ID (although the internal is all caps and external id is lower case, if this makes a difference). The script successfully connects to both AGOL and our internal portal.
Error below
---------------------------------------------------------------------------RuntimeError Traceback (most recent call last)<ipython-input-12-3b2f687ad756> in <module>() 19 print("syncing services") 20 ---> 21 sync_extint = ext_fs.replicas.sync_replicated_items(ext_item,int_item,'NWW Spot Report') 22 23 print(sync_extint)C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\managers.py in sync_replicated_items(self, parent, child, replica_name) 632 if child_replica_id and \ 633 parent_replica_id:--> 634 import tempfile, os 635 child_replica = child_replicas.get(replica_id=child_replica_id) 636 parent_replica = parent_replicas.get(replica_id=parent_replica_id)C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\managers.py in get(self, replica_id) 389 when the replica was created. 390 """--> 391 return self._fs._replica_info(replica_id) 392 393 # ----------------------------------------------------------------------C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\layer.py in _replica_info(self, replica_id) 1509 } 1510 url = self._url + "/replicas/" + replica_id-> 1511 return self._con.get(path=url, params=params, token=self._token) 1512 1513 # ----------------------------------------------------------------------C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\connection.py in get(self, path, params, ssl, compress, try_json, is_retry, use_ordered_dict, out_folder, file_name, force_bytes, add_token, token) 875 return self.get(path=path, params=params, ssl=True, compress=compress, try_json=try_json, is_retry=True) 876 --> 877 self._handle_json_error(resp_json['error'], errorcode) 878 return None 879 except AttributeError:C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\connection.py in _handle_json_error(self, error, errorcode) 1174 1175 errormessage = errormessage + "\n(Error Code: " + str(errorcode) +")"-> 1176 raise RuntimeError(errormessage) 1177 1178 class _StrictURLopener(request.FancyURLopener):RuntimeError: (Error Code: 500)
did you ever get this working?