Select to view content in your preferred language

ArcHydro 2.10.14 and ArcGIS Pro 2.9.0 error

936
2
02-22-2022 08:23 AM
Labels (2)
glasbergenm
New Contributor II

I've recently upgraded ArcGIS Pro to 2.9.0 and ArcHydro to 2.9.14. Now I was re-running the geoprocessing tool Create Drainage Line Structure from the history of an existing, updated aprx file and now the tool fails:

arcpy.Except:, ('line 2033', 'C:\\Program Files\\ArcGIS\\Pro\\Resources\\ArcToolBox\\Scripts\\ArcHydro\\createdrainagelinestructures.py', "AttributeError: 'GPEnvironment' object has no attribute 'OutputZFlag'")

The same happens when using a 'fresh' ArcGIS Pro project and new files. It seems to be a strange error, because the code in the line mentioned (arcpy.env.OutputZFlag = "disabled") works perfectly fine in the python command line in ArcGIS Pro.

Update: everything still works like a charm in ArcGIS Pro 2.8.3 on a different computer

Update2: also fails on a computer with ArcGIS Pro 2.9.1

0 Kudos
2 Replies
Septimer
New Contributor

I get the same issue with ArcGIS Pro 2.9.1 and 2.9.2

0 Kudos
DeanDjokic
Esri Contributor

Thanks for bringing this problem up.  it seems that 2.9 is a bit more case sensitive than previous versions were.  the original code stated "arcpy.env.OutputZFlag = "disabled"".  Worked fine till Pro 2.9.  In 2.9 it should be arcpy.env.outputZFlag = "Disabled".  if you are doing it from the python command line, the autocomplete will pick the lower case string representation and either version of "disabled" will work.  the script is not so forgiving.

This code has been fixed in the latest released version of Arc Hydro for Pro (2.9.23) as of 3/7/22.  Please download and upgrade (and as always, first uninstall the older version).

0 Kudos