env.overwriteOutput not working after upgrade to Pro 2.4

4198
13
Jump to solution
07-02-2019 10:43 AM
BruceJohnson
New Contributor II

I've been working on a python script for over a month; yesterday I upgraded to ArcGIS Pro 2.4.0 and now env.overwriteOutput no longer works, returning ERROR: 002852 Output feature class <path to fc> exists within geodatabase.

I'm using a file geodatabase; have made no changes to the script, and everything works great if I manually delete the feature classes from the geodatabase and run the script again.

I did have to create a new python clone, and reset my default editor to Spyder after the upgrade to 2.4.  Am I missing something, or can others confirm this same behavior?

-Bruce

13 Replies
DanPatterson_Retired
MVP Emeritus

https://support.esri.com/en/Search-Results#search?q=overwriteOutput&content-type=Bugs

overwriteOutput as a bug has been noted a few times, but not one mention of anything being references in this thread.  Shapefiles seemed to be the culprit and perhaps temporary data associations.

The lack of information could be due to:

  • no one has filed a technical support case to see if the situation can be replicated
  • someone from esri hasn't seen this thread and might be able to report on internal rumblings.

Perhaps... Kory Kramer‌  or Michelle Mathias

you could pass this on to someone... the Space Administrators for Python‌ seem not to have seen it and nothing relevant has hit the external support site

0 Kudos
KurtAdams
New Contributor II

I raised to tech support before I made my first post. The tech watched the error occur on screen share. I made dummy data and the error occurred in stand alone script and in the Analysis window. 

For me it happened with mixture of workspace and r string pathing. Also I only work with GDB and feature classes, never with shapefiles.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Do you have the bug number?

The only issues related to overwriteOutput are related to certain machine architecture or shapefiles

NIM064932: The Python overwriteoutput geoprocessor setting does.. 

or are ancient

https://support.esri.com/en/Search-Results#search?q=OverwriteOutput&content-type=Bugs

0 Kudos
RickWheeler1
New Contributor II

As an update I can get env.overwriteOutput = True to work if I use python raw string paths ie: r"c:\Path_to_data\myGDB.gdb" instead of other path treatments when setting the env.workspace environemnt setting. 

I generally use a mix of paths; sometimes forward slashes, sometimes backslashes with the r prefix.  Paths with backslashes and the r prefix work but no other path treatment(or at least as far as I have experimented) seems to work.