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