Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

OpenStudio Results measure: Optional not initialized.

asked 2019-12-28 19:36:49 -0600

Matt Koch gravatar image

updated 2020-07-31 08:16:24 -0600

OpenStudio 2.9.1 on Windows 7 Pro just tossed this error at me from the OpenStudio Results measure: "Interior Lighting Summary section failed and was skipped because: Optional not initialized. Detail on error follows.". Has anyone seen this before? Any fixes? Does this mean that other results from this measure may be suspect? Are the EnergyPlus results still trustworthy? I think I am still using a measure version from before 2.9.1 - Could that be a problem?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-12-29 22:41:11 -0600

updated 2020-01-02 11:58:30 -0600

@Matt Koch, If only that section is failing, I don't think it is anything work worry about, assuming you have interior lights in the model. My first guess is that one or more lights object names has a special character that is breaking the query in the tabular SQL data. You can look at the EnergyPlus HTML file to confirm the values for lights are as expected. If you don't have special character names then you can email the model to and I can take a look at the cause.

Updated Below after reviewing test model:

@Matt Koch, thanks for sending the test model. Below is a bit more of the error

Interior Lighting Summary section failed and was skipped because: Optional not initialized. Detail on error follows. ["/private/var/folders/83/rcnbz4dd5qqgf7rpc69354_x0g1kng/T/OpenStudioApp.s93602/resources/measures/openstudio_results/measure.rb:278:in `eval'\n/private/var/folders/83/rcnbz4dd5qqgf7rpc69354_x0g1kng/T/OpenStudioApp.s93602/resources/measures/openstudio_results/resources/os_lib_reporting.rb:3307:in `block in interior_lighting_section'\n/private/var/folders/83/rcnbz4dd5qqgf7rpc69354_x0g1kng/T/OpenStudioApp.s93602/resources/measures/openstudio_results/resources/os_lib_reporting.rb:3306:in

Line 3307, shown below is in a loop through spaces in the model and is finding the thermal zone. thermal_zone = space.thermalZone.get
space.thermalZone is an optional, as spaces in a model do not have to have a zone, although they typically do all have thermal zones by the time you run a simulation, so we didn't write a check in this code to see if the optional was initialized. The model you sent has a few spaces (mechanical, elevators, and plenums) that are not assigned to thermal zones.

Spaces that are not assigned to a thermal zone, are not passed forward translated to the IDF file. It won't necessarily stop the model from running, but it will be missing elements. There is a warning related to this in the output for the simulation, but doesn't make it into that HTML file, so it is easily missed. I may add new measure, or more likely a new section of the end of this to create table of warnings. Not just from this measure, but from any upstream measures that were run as part of the workflow. "step_warnings" : [ "EnergyPlus reported area is 1093 (m^2). OpenStudio reported area is 1156 (m^2).", "Interior Lighting Summary section failed and was skipped because: Optional not initialized. Detail on error follows.",

edit flag offensive delete link more


Thank you David. Yes, I thought so about the object names as well, but really, other than one or more dashes and some numbers, it is only characters. For example: "ASHRAE 90-1-2016 Break Room", or "ASHRAE 90-1-2016 Office - Closed". Maybe multiple dashes are a problem? Also, how do you uninstall a measure such as OpenStudio Reports, especially if it is installed to default folder and only named by GUID? I would like to uninstall OpenStudio Reports and reinstall it, but BCL Find Measures shows it checked and I cannot uncheck it there? I'll also send my OSM file to

Matt Koch gravatar image Matt Koch  ( 2019-12-31 20:22:29 -0600 )edit

@Matt Koch, if you wanted a fresh copy of all BCL measures, you can throw away your BCL directory by the user name. If you want to cherry pick and delete specific measures, you can search using your file browser within the BCL directory. You are correct the top level measures is a not very friendly UUID. If you go to the BCL website for example for OpenStudio Results, you can find the UUId in the left column; a25386cd-60e4-46bc-8b11-c755f379d916 in this case. Note that when you re-start the OS Application it will re-download the measure.

David Goldwasser gravatar image David Goldwasser  ( 2020-01-01 23:24:06 -0600 )edit

answered 2020-01-07 19:49:44 -0600

Matt Koch gravatar image

David, as usual, your insight is brilliant and spot-on. Thanks for saving me from udder and complete failure. I had to re-beat down my unmet hours after I assigned all my unconditioned spaces to unconditioned zones, but it was a lesson well worth it!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Question Tools



Asked: 2019-12-28 19:36:49 -0600

Seen: 360 times

Last updated: Jan 07 '20