Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

OpenStudio Results issue on OpenStudio 3.0 when measure comes from BCL vs. this GitHub repo. #23

Closed
DavidGoldwasser opened this issue Jun 25, 2020 · 3 comments
Assignees

Comments

@DavidGoldwasser
Copy link
Collaborator

https://unmethours.com/question/45411/pat-fails-as-soon-as-i-add-the-openstudio-results-measure/

The relevant error code there is
[09:45:59.636249 ERROR] :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb failed with message Error assigning argument in measure :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb. Failed with undefined method measure_warning_section' for OsLib_Reporting:Module,

While most measures use the extension gem for this file now, the measure still uses a copy in the resources folder so it can work on older versions of OpenStudio that don't have the extension gem or have an older version. I confirmed that the resource file in the measure has this method, I also confirmed that the OpenStudio 3.0 installer also has the same method, in case that was loaded and called instead. I don't see this in my Mac or Windows machine on PAT (I did local run and cloud run).

One possible solution is to avoid confusion about file by updating the measure to only use the gem and require OpenStudio 3.0 or later. Not 100% sure that will fix the issue, but it could be worth a try.

@DavidGoldwasser DavidGoldwasser self-assigned this Jun 25, 2020
@DavidGoldwasser
Copy link
Collaborator Author

I can reproduce this if I run OSM with openstudio_results from BCL which loads into app but doesn't show measure arguments. Here is part of my run.log

[14:42:09.270582 ERROR] Found error in state 'preprocess' with message [":/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb failed with message Error assigning argument in measure :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb. Failed with undefined method `measure_warning_section' for OsLib_Reporting:Module, /private/var/folders/83/rcnbz4dd5qqgf7rpc69354_x0g1kng/T/osmodel-1593117684-1/resources/measures/OpenStudioResults/measure.rb:143:in `eval'\n/private/var/folders/83/rcnbz4dd5qqgf7rpc69354_x0g1kng/T/osmodel-1593117684-1/resources/measures/OpenStudioResults/measure.rb:143:in `eval'\n/private/var/folders/83/rcnbz4dd5qqgf7rpc69354_x0g1kng/T/osmodel-1593117684-1/resources/measures/OpenStudioResults/measure.rb:143:in `block in arguments'\n/private/var/folders/83/rcnbz4dd5qqgf7rpc69354_x0g1kng/T/osmodel-1593117684-1/resources/measures/OpenStudioResults/measure.rb:140:in `each'\n/private/var/folders/83/rcnbz4dd5qqgf7rpc69354_x0g1kng/T/osmodel-1593117684-1/resources/measures/OpenStudioResults/measure.rb:140:in `arguments'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:368:in `apply_measure'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:92:in `block in apply_measures'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in `each_index'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in `apply_measures'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/jobs/run_preprocess.rb:73:in `perform'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:292:in `step'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:234:in `run'\n:/openstudio_cli.rb:973:in `execute'\n:/openstudio_cli.rb:763:in `execute'\n:/openstudio_cli.rb:1757:in `<main>'\neval:149:in `eval'\neval:149:in `require_embedded_absolute'\neval:123:in `block in require'\neval:117:in `each'\neval:117:in `require'\neval:3:in `<main>' in :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:472:in `rescue in apply_measure'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:353:in `apply_measure'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:92:in `block in apply_measures'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in `each_index'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in `apply_measures'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/jobs/run_preprocess.rb:73:in `perform'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:292:in `step'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:234:in `run'\n:/openstudio_cli.rb:973:in `execute'\n:/openstudio_cli.rb:763:in `execute'\n:/openstudio_cli.rb:1757:in `<main>'\neval:149:in `eval'\neval:149:in `require_embedded_absolute'\neval:123:in `block in require'\neval:117:in `each'\neval:117:in `require'\neval:3:in `<main>'::/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:647:in `rescue in apply_measure'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:305:in `apply_measure'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:92:in `block in apply_measures'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in `each_index'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in `apply_measures'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/jobs/run_preprocess.rb:73:in `perform'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:292:in `step'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:234:in `run'\n:/openstudio_cli.rb:973:in `execute'\n:/openstudio_cli.rb:763:in `execute'\n:/openstudio_cli.rb:1757:in `<main>'\neval:149:in `eval'\neval:149:in `require_embedded_absolute'\neval:123:in `block in require'\neval:117:in `each'\neval:117:in `require'\neval:3:in `<main>'"]}

@rwadhwa910
Copy link

@DavidGoldwasser I have the same issue with my machine and I am attaching my run.log file results here.

[15:33:37.357560 ERROR] :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb failed with message Error assigning argument in measure :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb. Failed with undefined method measure_warning_section' for OsLib_Reporting:Module, C:/Users/rwadhwa/AppData/Local/Temp/1/osmodel-1593119280-1/resources/measures/OpenStudioResults 1/measure.rb:143:in eval'
C:/Users/rwadhwa/AppData/Local/Temp/1/osmodel-1593119280-1/resources/measures/OpenStudioResults 1/measure.rb:143:in eval' C:/Users/rwadhwa/AppData/Local/Temp/1/osmodel-1593119280-1/resources/measures/OpenStudioResults 1/measure.rb:143:in block in arguments'
C:/Users/rwadhwa/AppData/Local/Temp/1/osmodel-1593119280-1/resources/measures/OpenStudioResults 1/measure.rb:140:in each' C:/Users/rwadhwa/AppData/Local/Temp/1/osmodel-1593119280-1/resources/measures/OpenStudioResults 1/measure.rb:140:in arguments'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:368:in apply_measure' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:92:in block in apply_measures'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in each_index' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in apply_measures'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/jobs/run_preprocess.rb:73:in perform' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:292:in step'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:234:in run' :/openstudio_cli.rb:973:in execute'
:/openstudio_cli.rb:763:in execute' :/openstudio_cli.rb:1757:in

'
eval:149:in eval' eval:149:in require_embedded_absolute'
eval:123:in block in require' eval:117:in each'
eval:117:in require' eval:3:in ' in :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:472:in rescue in apply_measure' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:353:in apply_measure'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:92:in block in apply_measures' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in each_index'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in apply_measures' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/jobs/run_preprocess.rb:73:in perform'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:292:in step' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:234:in run'
:/openstudio_cli.rb:973:in execute' :/openstudio_cli.rb:763:in execute'
:/openstudio_cli.rb:1757:in <main>' eval:149:in eval'
eval:149:in require_embedded_absolute' eval:123:in block in require'
eval:117:in each' eval:117:in require'
eval:3:in <main>' [15:33:37.357814 ERROR] Found error in state 'preprocess' with message [":/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb failed with message Error assigning argument in measure :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb. Failed with undefined method measure_warning_section' for OsLib_Reporting:Module, C:/Users/rwadhwa/AppData/Local/Temp/1/osmodel-1593119280-1/resources/measures/OpenStudioResults 1/measure.rb:143:in eval'\nC:/Users/rwadhwa/AppData/Local/Temp/1/osmodel-1593119280-1/resources/measures/OpenStudioResults 1/measure.rb:143:in eval'\nC:/Users/rwadhwa/AppData/Local/Temp/1/osmodel-1593119280-1/resources/measures/OpenStudioResults 1/measure.rb:143:in block in arguments'\nC:/Users/rwadhwa/AppData/Local/Temp/1/osmodel-1593119280-1/resources/measures/OpenStudioResults 1/measure.rb:140:in each'\nC:/Users/rwadhwa/AppData/Local/Temp/1/osmodel-1593119280-1/resources/measures/OpenStudioResults 1/measure.rb:140:in arguments'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:368:in apply_measure'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:92:in block in apply_measures'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in each_index'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in apply_measures'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/jobs/run_preprocess.rb:73:in perform'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:292:in step'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:234:in run'\n:/openstudio_cli.rb:973:in execute'\n:/openstudio_cli.rb:763:in execute'\n:/openstudio_cli.rb:1757:in <main>'\neval:149:in eval'\neval:149:in require_embedded_absolute'\neval:123:in block in require'\neval:117:in each'\neval:117:in require'\neval:3:in <main>' in :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:472:in rescue in apply_measure'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:353:in apply_measure'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:92:in block in apply_measures'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in each_index'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in apply_measures'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/jobs/run_preprocess.rb:73:in perform'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:292:in step'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:234:in run'\n:/openstudio_cli.rb:973:in execute'\n:/openstudio_cli.rb:763:in execute'\n:/openstudio_cli.rb:1757:in '\neval:149:in eval'\neval:149:in require_embedded_absolute'\neval:123:in block in require'\neval:117:in each'\neval:117:in require'\neval:3:in '::/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:647:in rescue in apply_measure'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:305:in apply_measure'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:92:in block in apply_measures'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in each_index'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in apply_measures'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/jobs/run_preprocess.rb:73:in perform'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:292:in step'\n:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:234:in run'\n:/openstudio_cli.rb:973:in execute'\n:/openstudio_cli.rb:763:in execute'\n:/openstudio_cli.rb:1757:in <main>'\neval:149:in eval'\neval:149:in require_embedded_absolute'\neval:123:in block in require'\neval:117:in each'\neval:117:in require'\neval:3:in `'"]}

@DavidGoldwasser DavidGoldwasser changed the title OpenStudio Results issue on OpenStudio 3.0 on some window machines OpenStudio Results issue on OpenStudio 3.0 when measure comes from BCL vs. this GitHub repo. Jun 25, 2020
@DavidGoldwasser
Copy link
Collaborator Author

This was a corruption issue on BCL so there wasn't a change required here. For some reason multiple os_lib_reporting.rb became associated with the same measure (openstudio_results) and an older outdated one was getting put in the zip file instead of the new one. Solution for now was to manually make zip file and manually upload it via web interfaces; instead of using rake stage and rake push.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants