Select to view content in your preferred language

Windows Task Scheduler Error

1320
13
12-06-2023 11:14 AM
AshleyHayes2
Regular Contributor

When I run Data Interoperability via Windows Task Scheduler, I receive an "ERROR : Python Exception <ExecuteError>: ERROR 160236: The operation is not supported by this implementation. Failed to execute (DeleteRows)." from my shutdown script.  

When I run it manually in ArcPro, I do not receive any errors and everything works as expected.

Any suggestions?  

Also, @BruceHarold -- is there a way to subscribe to your "What's New in ArcGIS Data Interoperability" blog posts?

Thank you!!

13 Replies
GB_-_JonathanJew__GISS_
Occasional Contributor

I don't consider this a true solution, but in case it helps folks: 

The feature class that was causing issues in my case was a hosted feature service.

Rather than using arcpy's deleteFeatures() and deleteRows(), I was able to accomplish the same effect by using the arcgis API instead. 

gis = GIS("home") # Uses active Pro sign-in

fl = gis.content.get("<your feature ID>").layers[0]

fl.delete_features(where="1=1") # Deletes all features

 

Obviously, this would only work for hosted features classes.

In my case, spatial queries were disabled on the server, forcing me to do spatial analysis locally with arcpy, so the resulting code is a mishmash of arcpy and arcgis for python, but it works within task scheduler. 

 

0 Kudos
BruceHarold
Esri Frequent Contributor

I haven't tried it but I think you can abstract working with any type of feature layer in core ArcPy and delete any or all features as you see in the examples here:

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/delete-features.htm

 

0 Kudos
GB_-_JonathanJew__GISS_
Occasional Contributor

Yes, but it is precisely that function that causes the error in question. My workaround is explicitly avoiding that function because it causes the:
ERROR 160236: The operation is not supported by this implementation.

0 Kudos
BruceHarold
Esri Frequent Contributor

OK thanks, the reply chain got lost.  I'll see if the tool owner has any insights, not being able to log a support call makes it harder.

0 Kudos