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

SWIG Director Method Error in Create DOE Prototype Building with Weather File

asked 2024-09-29 16:51:17 -0600

tarun.arasu's avatar

updated 2024-09-29 19:58:55 -0600

Hi all,

I’m encountering an issue while trying to run the Create DOE Prototype Building measure in OpenStudio 3.8.0. The error specifically arises when the measure attempts to read the weather file. Here is the error message from the log:

Error: SWIG director method error. IOError: not opened for reading
Traceback (most recent call last):
  :/ruby/3.2.0/gems/openstudio-standards-0.6.1/lib/openstudio-standards/weather/information.rb:198:in `each'
  :/ruby/3.2.0/gems/openstudio-standards-0.6.1/lib/openstudio-standards/weather/information.rb:198:in `get_standards_weather_file_path'
  :/ruby/3.2.0/gems/openstudio-standards-0.6.1/lib/openstudio-standards/weather/information.rb:238:in `climate_zone_representative_weather_file_path'
  :/ruby/3.2.0/gems/openstudio-standards-0.6.1/lib/openstudio-standards/weather/modify.rb:376:in `model_set_building_location'
  :/ruby/3.2.0/gems/openstudio-standards-0.6.1/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb:37:in `model_create_prototype_model'
  C:/Users/tarun/OpenStudio/Measures/create_DOE_prototype_building/measure.rb:200:in `run'
[openstudio.workflow.OSWorkflow] Found error in state 'OpenStudioMeasures' with message: 'Runner error: Measure 'C:/Users/tarun/OpenStudio/Measures/create_DOE_prototype_building/measure.rb' reported an error with [SWIG director method error. IOError: not opened for reading]

Key Details:

OpenStudio version: 3.8.0 The EPW file path specified is: C:/UrbanoptRuns/OpenstudioRuns/WeatherFiles/USA_NJ_Newark.Intl.AP.725020_TMY3.epw

What I've tried so far:

Verified that the EPW file exists in the directory. Set the absolute path for the EPW file in the code to avoid relative path issues. Despite this, I continue to get the "not opened for reading" error. I believe the problem could be related to how OpenStudio is handling the weather file, but I can't pinpoint the exact issue.

Has anyone faced a similar problem or have insights on how to resolve this error?

Thanks in advance for any help!

edit retag flag offensive close merge delete

Comments

How do we reproduce the error please? If this is a workflow (OSW), can you zip the OSW?

Julien Marrec's avatar Julien Marrec  ( 2024-09-30 16:40:46 -0600 )edit

Hi Julien,

Attached is the zipped osw file.

Link: https://www.dropbox.com/scl/fi/gxdzba...

Below is the data in the osw file:

{ "created_at" : "20241001T020047Z", "seed_file" : "../test.osm", "steps" : [ { "arguments" : {}, "description" : "Creates the DOE Reference Building Models as starting points for other analyses.", "measure_dir_name" : "create_DOE_prototype_building", "modeler_description" : "", "name" : "Create DOE Prototype Building" },

tarun.arasu's avatar tarun.arasu  ( 2024-09-30 21:10:26 -0600 )edit

I experience the same error with the demo 1 that comes with measure. The osm and epw files.

Adrià González-Esteve's avatar Adrià González-Esteve  ( 2024-10-01 04:18:16 -0600 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2024-10-01 13:02:16 -0600

edit flag offensive delete link more

Comments

Thanks a bunch! I'll wait until October end in that case.

tarun.arasu's avatar tarun.arasu  ( 2024-10-03 10:41:59 -0600 )edit

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: 2024-09-29 16:51:17 -0600

Seen: 115 times

Last updated: Oct 01