NatLabRockies / NatLabRockies/OpenStudio
Failed to Infer Measure Name
@kbenne is already working on this.
Since Jun 4, 2024.
- Dominant language
- C++
- Stars
- 646
- Forks
- 237
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 10
Description
When running the openstudio CLI measure -u call on a measure, I often get this error: "Failed to infer measure name from '/path/to/measure/measure.rb'". I get it on Python measures as well as Ruby measures. This error also ends up in the xml file in an tag. For example: https://github.com/NREL/OpenStudio-workflow-gem/blob/39c84e45f152446a92379a501807e2691dba15ab/spec/files/script_error_osw/measures/IncreaseWallRValue/measure.xml#L4
Measures contains such errors do not get uploaded to the BCL. I don't think they work in the OS apps either.
Ruby code that triggers the error:
https://github.com/NREL/OpenStudio/blob/ba1b94b6542c1f1d4cdcdb775886852b9a82bc4f/ruby/engine/RubyEngine.cpp#L154-L203
Python code that triggers the error:
https://github.com/NREL/OpenStudio/blob/eb043d23f746e8df3b2819ac43eeb19958973e0c/python/engine/PythonEngine.cpp#L286-L310
I'd like to understand better why this error is being triggered...I can't tell exactly from the code. It would seem like there's a typo or not-recommended pattern in the class name, but that doesn't actually seem to be the case.
Another piece of information: I can sometimes update a measure with openstudio measure -u which triggers the error (in addition to doing other cleanup with the files and checksums but doesn't touch name/class_name), remove the error from the measure.xml, re-update the measure with openstudio measure -u again, and now it works?!
thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.