0

I am using our Enterprise Portal Notebook server to create a notebook of a toolbox that already exists, one that appends from an AGOL layer that has attachments.

We use the code:

with arcpy.EnvManager(preserveGlobalIds=True, maintainAttachments=True):
        arcpy.management.Append(inputs=agol_url, target=target, schema_type="NO_TEST", field_mapping="", subtype="", expression=where_clause)

This exact code works in ArcGIS Pro notebook, and it works when calling the toolbox file from the notebook server, but it gives an error when called in the notebook with the same parameters.

The 'agol_url' is changed in the error from the actual layer.

ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Datasets: Dataset agol_url does not exist or is not supported Failed to execute (Append).

I have used the code gis = GIS(portal_url, username, password) and x = arcpy.SignInToPortal(portal_url, username, password) to sign in and try and set the active portal thinking this was the problem, but it still does not work while I can .edit_features() of the AGOL layer just fine, so I'm stumped.

1 Answer 1

0

Solved after days of trying different things.

Finally figured out with help from others that the company AGOL url would allow me to edit and delete features from the AGOL layer but not use it in the append tool.

Changed the url to r'https://www.arcgis.com/' and the append works now with nothing else changed.

Not sure what the interaction is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.