Select to view content in your preferred language

Delete

792
7
09-27-2023 01:19 PM
mejohnson22
New Contributor II

delete

Tags (1)
7 Replies
VinceAngelo
Esri Esteemed Contributor

You need to include the meat of your execute() function in order to get help on this. The code should include an arcpy.da.Editor "with" block.

- V

0 Kudos
CMV_Erik
Occasional Contributor


Screenshot 2023-10-02 105845.png

 

 

🙂

 

 

0 Kudos
mejohnson22
New Contributor II

I copied and pasted from ArcPro 

0 Kudos
CMV_Erik
Occasional Contributor

It's misspelled in Line 14 in the code above too. The error message is valid; the code needs to be fixed. 

EDIT: I just noticed the code is asking for the connectionProperties of a layer, which I don't think is available. It is available in the workspace though. 

mejohnson22
New Contributor II

I fixed the spelling error. It is first getting the workspace of the layer on line 13. then I am trying to get the version because I am only trying to edit within a version, not within the default. 

0 Kudos
CMV_Erik
Occasional Contributor

The properties returned by the Describe methods vary based on the type of object being described. 

"desc" is Describe-ing a layer, so it only has the properties of a layer.

Layer properties—ArcGIS Pro | DocumentationGeodatabase Feature Class properties—ArcGIS Pro | Documentation

If you want the properties of the workspace, I would get the output of a separate Describe method using 'workspace' (or desc.path) as an input 

Workspace properties—ArcGIS Pro | Documentation

 

0 Kudos
BlakeTerhune
MVP Regular Contributor

Maybe try getting the parameter object instead of the text in case describe() isn't complete with just the text. Also make sure that the layer you are inputting is correct (is in an enterprise geodatabase).

0 Kudos