architecture-building-systems / CityEnergyAnalyst

The City Energy Analyst (CEA)
https://www.cityenergyanalyst.com/
MIT License
193 stars 61 forks source link

Radiation script actively suppresses errors resulting in infinite loop #590

Closed daren-thomas closed 7 years ago

daren-thomas commented 7 years ago

Check out this code:

    for day in range(1, 366):
        result = None
        while result is None:  # trick to avoid that arcgis stops calculating the days and tries again.
            try:
                result = CalcRadiation(day, dem_rasterfinal, observers, T_G_day, latitude,
                                       locator.get_temporary_folder(), aspect_slope, heightoffset, gv)
            except arcgisscripting.ExecuteError as e:
                # redo the calculation
                pass

This sounds like a good idea (hint: "trick") but, it just causes an infinite loop if CalcRadiation for some reason doesn't work. Like in my case right now, where an arcgisscripting.ExecuteError is thrown:

arcgisscripting.ExecuteError: ERROR 999999: Error executing function. Failed to execute (PointsSolarRadiation).

@JIMENOFONSECA: Should we fix this or proceed to the new solar radiation module? Are we going to keep the ArcGIS version midterm or not?

jimenofonseca commented 7 years ago

@daren-thomas I believe we should close it as from the end of this sprint, there would not be more support for the radiation interface