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 2025-02-25 07:19:57 -0500

MarcF's avatar

updated 2025-02-25 13:47:46 -0500

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']'

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2025-02-26 03:21:37 -0500

updated 2025-02-26 03:23:40 -0500

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

edit flag offensive delete link more

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: 2025-02-25 07:19:57 -0500

Seen: 127 times

Last updated: Feb 26