SWIG Director Method Error in Create DOE Prototype Building with Weather File
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!
How do we reproduce the error please? If this is a workflow (OSW), can you zip the OSW?
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" },
I experience the same error with the demo 1 that comes with measure. The osm and epw files.