Hello,
So I had a bunch of SDE connection files on a network drive. Used them fine for years and today I'm getting a 00732 Error (does not exist or is not supported) for all of them. I read this and I guess you need the connection file to be local. Well, they haven't been local ever and have worked fine, but I brought it into C:\ and got the same error.
What's the deal? Why did these just break for no reason? The connection file works just fine within Pro.
Code:
import arcpy
import os
arcpy.env.overwriteOutput = True
# Connection file to the enterprise geodatabase can be different on different computers
inputGDB = r"<Network Path>.sde"
arcpy.env.workspace = inputGDB
outputGDB = r"<Network Path>\Spring2024.gdb"
where = """{} = 'Spring2024'""".format(arcpy.AddField_management(inputGDB, "Season_Year"))
if not arcpy.Exists(outputGDB):
arcpy.CreateFileGDB_management(r'<Network Path>', 'Spring2024.gdb')
all_features = arcpy.ListFeatureClasses()
for feature in all_features:
outputPath = os.path.join(outputGDB, f'{feature}_Spring2024')
arcpy.analysis.Select(feature, outputGDB, where)
print(outputPath + ' Completed')
Error:
Traceback (most recent call last):
File "<string>", line 11, in <module>
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 5174, in AddField
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 5171, in AddField
retval = convertArcObjectToPythonObject(gp.AddField_management(*gp_fixargs((in_table, field_name, field_type, field_precision, field_scale, field_length, field_alias, field_is_nullable, field_is_required, field_domain), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 520, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Table: Dataset C:\Users\cowinch\AppData\Roaming\Esri\Desktop10.8\ArcCatalog\HERDCOMPeditor@HerdComp@NRIMP-DB.sde does not exist or is not supported
Failed to execute (AddField).
Solved! Go to Solution.
Turned out to be a networking issue, did a DNS Flush and I was able to set the .sde file on the network drive to env. workspace.
Hi @ccowin_odfw,
Can you post a snippet of your code on how you are referencing the SDE connection files?
Turned out to be a networking issue, did a DNS Flush and I was able to set the .sde file on the network drive to env. workspace.