It returns (0,0), so I have an error somewhere. But it fails silently. I think the issue is when it try to run the file run_workflow.sh - if I navigate and run that file myself, I get:
Found error in state 'initialization' with message ["Cannot find measure from_honeybee_model::/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:155:in `block in validate_measures'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:in `each'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:in `each_with_index'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:in `validate_measures'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/jobs/run_initialization.rb:122:in `perform'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/run.rb:291:in `step'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/run.rb:233:in `run'\n:/openstudio_cli.rb:1067:in `execute'\n:/openstudio_cli.rb:803:in `execute'\n:/openstudio_cli.rb:1855:in `<main>'\neval:186:in `eval'\neval:186:in `require_embedded_absolute'\neval:171:in `block in require_embedded'\neval:165:in `each'\neval:165:in `require_embedded'\neval:124:in `require'\neval:3:in `<main>'"]
So again, it appears I’m not properly installing measures. Any tips or can someone point me in the direction of the documentation for this?
Looking at the code, it’s not possible for the to_openstudio_osw command to return (0, 0) so I don’t know what you are referring to here. If you want a good sample for how to use this method, I would check the source code of the “Model To OSM” component:
It’s still not possible to get (0, 0) out of that function but you can get (None, None) and so I imagine that is what you mean.
You will get (None, None) if running the OSW failed and you should check the .log file in the input osw_json’s folder to see why OpenStudio CLI failed.
And, yes, that is how you add additional measures except that the class is called Measure (with a capital M) instead of 'measure`.
Ah, that’s probably why you have this issue, then. It looks like your docker image does not have the measures of the honeybee-openstudio-gem installed in it and so OpenStudio CLI complains. Why not just use the honeybee-energy docker image instead, which has all of the honeybee-energy Python libraries, the honeybee-openstudio-gem and a compatible copy of OpenStudio:
… plus it’s a lot smaller than the OpenStudio docker image as we’ve trimmed out a lot of the parts of the OpenStudio image that have specialized use-cases.
Hey @chris - I appologize for the long delay, but I had just started to get around to trying this out. It does seem like a good solution, but it leads me to running into a new issue: