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

Revision history [back]

The error message indicates that translateModel takes an OpenStudio Model object, but what you're passing in is an OptionalModel. Try forward_translator.translateModel(model.get) instead.

The error message indicates that translateModel takes an OpenStudio Model object, but what you're passing in is an OptionalModel. Try forward_translator.translateModel(model.get) instead.

OptionalModel is a container that will hold a Model object if the translation succeeded. The get method returns the Model object or fails if the translation failed, so it is a good idea to check to make sure that the optional actually holds something before calling get (if !model ... or similar). Similar issues came up here and here. You're not the first to get tripped up.