dpinney / omf

The Open Modeling Framework for smart grid cost-benefit analysis.
https://omf.coop
GNU General Public License v2.0
112 stars 60 forks source link

Derates above 1 crash Pvwatts, show unhelpful error message. #283

Closed dpinney closed 9 years ago

dpinney commented 9 years ago

STEPS TO REPRODUCE Run a pvwatts model with these settings: image

EXPECTED BEHAVIOR Catch the crash with a try/except, and redirect the user back to the model screen (as in the other models).

NOTES I don't remember if all our models display stderr when the 3rd party code crashes. If we don't display that, then we need an issue for that. And in this issue we need to try to get Pvwatts to print out something useful when it crashes.

mannanj commented 9 years ago

RESOLVED: Modify the run function in pvWatts.py model so that:

  1. Add try-except loop to check if outputdatafile exists, if so delete it. (lines 24-27)
  2. Enclose the rest of the function code in try-except (line 30-114) b. In the except clause, check if the outputdatafile exists, if so delete it. (lines 117-120)

RESULTANT OUTPUT: test_try_except_derate