Select to view content in your preferred language

Windows Task Scheduler Error

2071
15
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!!

15 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
MariaGiarrusso
Occasional Contributor

Having same issue.  Using a Pro Model.  I call it from a batch file that gets scheduled every night. Worked fine for a while and then it started throwing errors.  This post suggested cleaning up temp files as a solution.  Worked for some, but did not work for me.  Solved: Re: "The operation is not supported by this implem... - Esri Community

Will start a case w/ ESRI.

MariaGiarrusso
Occasional Contributor

Opened a case w/ ESRI (#04082860).  Was able to resolve this issue by verifying that I didn't hit one of the limitations below (which I did - versioned data as an input to append was not supported) AND cleaning out the temp folder C:\Users\<user>\AppData\Local\Temp

 

Per ESRI, things to check:

Python scripts that contain expressions to truncate and append to hosted layers within ArcGIS Online can often experience issues. There are a few limitations when working with truncates and ArcGIS products. For example:
 

  •  Truncate on a standalone SQL database table is not supported.
  • Complex data types such as terrains, topologies, and network datasets are not supported as input.
  • Versioned data is not supported as input.
  • The input database table or feature class must be from a database connection established as the data owner.