I have a script that performs a truncate and append on a feature class in an enterprise gdb. The feature class is not in a feature dataset, it is not versioned, and it is not open in any map/catalog session. It does feed a map service hosted on Portal. I stop the map service before attempting the truncate.
The error "160592: Truncation not allowed while editing." is thrown when running the script (python 3.7) or when running truncate table within ArcGIS Pro. This error does not occur when running in ArcMap (I have not tried in a stand alone script python 2.7). I have tried using the Editor class to start and stop and edit session before running the truncate, thinking it might do the trick, but no luck.
I have a hunch this is caused by ArcGIS Pro's "always in an edit session" feature. Has anyone else experienced this, found a work around, or have any ideas of other things to check/try? Thanks!