First time here? Check out the Help page!

Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
1

OpenStudio swig errors when applying measures

asked Feb 25

MarcF's avatar

updated Feb 25

Hello

I often get ''SWIG director method errors'' when I apply a measures OpenStudio 3.9 version Windows 11 OS

Measure.rb line 310 to 318 BTAP::Geometry::Wizards::create_shape_rectangle(model, length = a, width = b, above_ground_storys = above_grade_floors, under_ground_storys = 0, # Set to 1, when modeling a basement floor_to_floor_height = floor_to_floor_height, plenum_height = plenum_height, perimeter_zone_depth = perimeter_depth, initial_height = 0.0)

ADVANCED MEASURE OUTPUT Standard Output: [openstudio.measure.OSRunner] SWIG director method error. NameError: uninitialized constant BTAP::Geometry::Wizards

Traceback (most recent call last): eval:416:in const_missing' C:/Users/Marc/Documents/10. FICHIERS INSTALLATION/OPENSTUDIO/measures/nrc_create_geometry/measure.rb:310:inrun' [openstudio.workflow.OSWorkflow] Found error in state 'OpenStudioMeasures' with message: 'Runner error: Measure 'C:/Users/Marc/Documents/10. FICHIERS INSTALLATION/OPENSTUDIO/measures/nrc_create_geometry/measure.rb' reported an error with [SWIG director method error. NameError: uninitialized constant BTAP::Geometry::Wizards

Traceback (most recent call last): eval:416:in const_missing' C:/Users/Marc/Documents/10. FICHIERS INSTALLATION/OPENSTUDIO/measures/nrc_create_geometry/measure.rb:310:inrun']'

Standard Error: Failed to run workflow. Last Error: Found error in state 'OpenStudioMeasures' with message: 'Runner error: Measure 'C:/Users/Marc/Documents/10. FICHIERS INSTALLATION/OPENSTUDIO/measures/nrc_create_geometry/measure.rb' reported an error with [SWIG director method error. NameError: uninitialized constant BTAP::Geometry::Wizards

Traceback (most recent call last): eval:416:in const_missing' C:/Users/Marc/Documents/10. FICHIERS INSTALLATION/OPENSTUDIO/measures/nrc_create_geometry/measure.rb:310:inrun']'

run.log: [08:02:13.549026 ERROR] [openstudio.measure.OSRunner] SWIG director method error. NameError: uninitialized constant BTAP::Geometry::Wizards

Traceback (most recent call last): eval:416:in const_missing' C:/Users/Marc/Documents/10. FICHIERS INSTALLATION/OPENSTUDIO/measures/nrc_create_geometry/measure.rb:310:inrun' [08:02:13.550026 ERROR] [openstudio.workflow.OSWorkflow] Found error in state 'OpenStudioMeasures' with message: 'Runner error: Measure 'C:/Users/Marc/Documents/10. FICHIERS INSTALLATION/OPENSTUDIO/measures/nrc_create_geometry/measure.rb' reported an error with [SWIG director method error. NameError: uninitialized constant BTAP::Geometry::Wizards

Traceback (most recent call last): eval:416:in const_missing' C:/Users/Marc/Documents/10. FICHIERS INSTALLATION/OPENSTUDIO/measures/nrc_create_geometry/measure.rb:310:inrun']'

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered Feb 26

updated Feb 26

You need to read it carefully: NameError: uninitialized constant BTAP::Geometry::Wizards.

TL;DR: Your measure was written targetting an older version of openstudio-standards. openstudio-standards removed the BTAP::Geometry::Wizardsmodule at version 0.6.0. Methods were moved to another namespace.

The new method would be OpenstudioStandards::Geometry.create_shape_rectangle

https://github.com/NREL/openstudio-st...


Commit that moved the methods: https://github.com/NREL/openstudio-st...

The OpenStudio-SDK-Version-Compatibility-Matrix has a link to the gemfile were you'll see OS SDK 3.9.0 uses openstudio-standards 0.7.0. You can also know that by calling the OS CLI: openstudio gem_list

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: Feb 25

Seen: 133 times

Last updated: Feb 26