I have recently successfully run an OpenStudio measure without any errors, but until today, the measure does not successfully run. The error I am receiving is new, and judging by the general description, it appears to pertain to a version discrepancy. I believe I updated OpenStudio to 1.11.0 after successfully running the measure, but didn't realize the updating would cause problems. Needless to say, I'm not really sure how to tackle the issue, so any help would be great.
To clarify, several lines of code were written to clone a unit heater from an osm file (MTH150.osm). The code is:
heater_path = OpenStudio::Path.new("#{File.dirname(__FILE__)}/resources/MTH150.osm")
heater_inputmodel=translator.loadModel(heater_path)
translator = OpenStudio::OSVersion::VersionTranslator.new
heater_inputmodel=heater_inputmodel.get
heater_in_zone=heater_inputmodel.getZoneHVACUnitHeaters[0]
# Clone Unit Heater and Add To Thermal Zone
heater_clone = heater_in_zone.clone(model).to_ZoneHVACUnitHeater.get
heater_clone.addToThermalZone(thermalZones[0])
Portions of the error message can be seen by the attachment. Again, I have not had any problems with running the measure before and am not certain of how to approach the problem.