You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python measures fail to show up after accessing measures in OS 1.4. Seems like OS 1.4 is trying to load them. This causes them not to show up in OS 1.8.
Current Behavior
Measures no longer show up in OS 1.8.
This error appears in the measure xml after accessing measures in OS 1.4:
Unable to locate primary Ruby script path for BCLMeasure 'new_measure' located at /.../OpenStudio/Measures/new_measure 1.
Expected Behavior
Python measures should still show up in OS 1.8.
Steps to Reproduce
Create or already have an OS measure written in python
Open OS 1.4
Go to measures tab or hit apply measure now in OS 1.4
Python measure no longer shows up in OS 1.8
Possible Solution
Not sure if there is a way to do it already, but a short term fix would be being able to set a different measures directory for different OS versions should fix it. When I try to change the measures directory for OS 1.4, it also changes it for OS 1.8. A way to fix the broken measures would also be helpful.
Details
Environment
Python
Some additional details about your environment for this issue (if relevant):
Platform (Operating system, version): Mac M3
Version of OpenStudioApplication (if using an intermediate build, include SHA): 1.4/1.8
Context
Need a way to open OS 1.4 and not have all the Python measures break/not appear in OS 1.8.
The text was updated successfully, but these errors were encountered:
jzsustain
added
the
Triage
Issue needs to be assessed and labeled, further information on reported might be needed
label
Nov 8, 2024
As a temporary fix to get the measures working again, adding the below in the measure xml files section fixes the measure. Tedious to go through all the measures though.
I can reproduce this. When opening OpenStudio Application 1.4.0 the file entry for measure.py is removed, that is a bug but we won't be able to fix that in an old version.
Then when you re-open OpenStudio Application 1.8.0 the code in BCLMeasure only checks for measure.rb and measure.py in the files section of the xml; https://github.com/NREL/OpenStudio/blob/develop/src/utilities/bcl/BCLMeasure.cpp#L399. I'm not sure if it would be a good idea to have that code check for the file on disk if it wasn't present in the xml?
Honestly, if this was affecting me, I would create a git repository for my measures (probably a good idea anyway). Then after working in OpenStudio Application 1.4.0, I would do a git restore . before opening OpenStudio Application 1.8.0. Here are some instructions to make a local git repo, or you could also make a repo on GitHub and clone it locally:
The reason that measure.py is removed from the files in the xml by OpenStudio Application 1.4.0 is that it is not an approved root level file for 1.4.0:
Issue overview
Python measures fail to show up after accessing measures in OS 1.4. Seems like OS 1.4 is trying to load them. This causes them not to show up in OS 1.8.
Current Behavior
Measures no longer show up in OS 1.8.
This error appears in the measure xml after accessing measures in OS 1.4:
Unable to locate primary Ruby script path for BCLMeasure 'new_measure' located at /.../OpenStudio/Measures/new_measure 1.
Expected Behavior
Python measures should still show up in OS 1.8.
Steps to Reproduce
Possible Solution
Not sure if there is a way to do it already, but a short term fix would be being able to set a different measures directory for different OS versions should fix it. When I try to change the measures directory for OS 1.4, it also changes it for OS 1.8. A way to fix the broken measures would also be helpful.
Details
Environment
Python
Some additional details about your environment for this issue (if relevant):
Context
Need a way to open OS 1.4 and not have all the Python measures break/not appear in OS 1.8.
The text was updated successfully, but these errors were encountered: