OpenStudio Version Discrepancies Errors
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.
How are you running your tests? It appears that the Ruby you are using to run your tests is pointing to an old OpenStudio install (1.10.1) but your model is 1.11.0.
I'm running them on a git shell. I've gone through the Gemfile, Gemfile.lock, and Rakefile for the specific repository that the measure is located in but can't seem to locate specific lines of code that point to an older version of OpenStudio. Does that make sense?
I personally have a 'openstudio.rb' file in my Ruby install under '\lib\ruby\site_ruby' that points to the version of OpenStudio to use. You should talk to whoever set you up to begin with to see if they remember.
I just now saw your comment, but you are right. I revised that file and no errors seem to be occurring. Thanks for the help!