Hi,
I have a feature class called DeviceView that I need to delete and recreate. The logic that I use to delete feature classes is:
def delete(fc):
if arcpy.Exists(fc):
print(f"{fc} exists, deleting...", end="")
try:
arcpy.Delete_management(fc)
print("successful")
except Exception as e:
print(f"unable to delete, reason: {e}")
else:
print(f"{fc} doesn't exist, skipping...") When I execute the logic above, I get the following log in the console:
DeviceView exists, deleting...successful
Which indicates to me that the operation was 'successful' and no exception was generated while attempting to delete it.
However, the View still exists in the database after executing that logic and a subsequent scripts fails because of this.
I know the delete logic works for other feature classes (not views) which are effectively deleted from the DB.
Thanks in advance for any advise that could give an insight into this issue.