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

Problem using runmanager via SDK in openstudio 1.8.0

asked 2015-08-12 14:31:33 -0500

I'm using the runmanager via the Python bindings to run OSM models. My code from OpenStudio 1.6.0 isn't working with the latest 1.8.0 bindings. When calling:

j = openstudio.runmanager.Job(
    os.path.join(osm_path, osm_name),

rm = openstudio.runmanager.RunManager(rm_path, True, True, False, False)
rm.enqueue(j, True)

I get the following error:

 Traceback (most recent call last):
  File "", line 45, in <module>
    rm.enqueue(j, True)
  File "/home/crafter/scripts/openstudio/", line 3415, in enqueue
    return _openstudiorunmanager.RunManager_enqueue(self, *args)
NotImplementedError: Wrong number or type of arguments for overloaded function 'RunManager_enqueue'.
  Possible C/C++ prototypes are:
    openstudio::runmanager::RunManager::enqueue(openstudio::runmanager::Job const &,bool,openstudio::path const &)
    openstudio::runmanager::RunManager::enqueue(openstudio::runmanager::Job const &,bool)
    openstudio::runmanager::RunManager::enqueue(std::vector< openstudio::runmanager::Job,std::allocator< openstudio::runmanager::Job > > const &,bool,openstudio::path const &)
    openstudio::runmanager::RunManager::enqueue(std::vector< openstudio::runmanager::Job,std::allocator< openstudio::runmanager::Job > > const &,bool)

I appear to have the correct number of arguments, so am at a loss for what is causing the problem.

edit retag flag offensive close merge delete


Seems like the signature:

openstudio::runmanager::RunManager::enqueue(openstudio::runmanager::Job const &,bool)

should match what you are trying to do, @MarkAdams have you seen anything like this?

macumber's avatar macumber  ( 2015-08-12 16:48:56 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-08-12 16:55:54 -0500

updated 2015-08-12 21:53:53 -0500

I bet your Job object is not actually being created properly, resulting in it being None or an Optional. This would then cause the error when you go to enqueue that Job.

Looking at the header file for createModelToIdfJob(), it wants an openstudio::path as an input. I bet if you wrapped your paths in openstudio.path() then it should work as you expect.

j = openstudio.runmanager.Job(
    openstudio.path(os.path.join(osm_path, osm_name)),


Make sure that rm_path is a path to a database file.

rm = openstudio.runmanager.RunManager('/Users/local_user/Desktop/test_run.db', True, True, False, False)

If the database file does not exist, RunManager will create one for you. I was able to reproduce your error locally on my Mac when I just used...

rm = openstudio.runmanager.RunManager('/Users/local_user/Desktop/', True, True, False, False)

When the path points to a database file, it works.

I will say that using RunManager to translate from Model to IDF is kind of overkill. You can do the same, better and faster, just using ForwardTranslator.

# Forward Translate from OSM to IDF and save()
translator = openstudio.energyplus.ForwardTranslator()
idf_string = translator.translateModel(test_model)
with open('/Users/local_user/Desktop/test_idf.idf', 'w') as idf_file:

Then you can run that IDF file using RunManager to createEnergyPlusJob...

rm = openstudio.runmanager.RunManager('/Users/local_user/Desktop/test_run.db', True, True, False, False)
ep_tool = openstudio.runmanager.ToolInfo('/Applications/EnergyPlus-8-3-0/energyplus') # ep path
job = openstudio.runmanager.JobFactory.createEnergyPlusJob(
  '/Applications/EnergyPlus-8-3-0/Energy+.idd', # idd path
  '/Users/local_user/Desktop/test_idf.idf', # idf path
  '/Applications/EnergyPlus-8-3-0/WeatherFiles/Chicago.epw', # epw path
  '/Users/local_user/Desktop' # output path
rm.enqueue(job, True)
edit flag offensive delete link more


@MarkAdams interesting thought but it didn't work. I still get the same error. I'll look into the paths to make sure there isn't an error due to an incorrect or missing path.

jmcneill's avatar jmcneill  ( 2015-08-12 17:38:35 -0500 )edit

@jmcneill See my new update and hopefully it solves your error now.

MarkAdams's avatar MarkAdams  ( 2015-08-12 21:32:44 -0500 )edit

@MarkAdams I was trying to follow the Ruby examples that used the JobFactory, but had been using the ForwardTranslator in most of my work. Good to know that it's more efficient.

It was a path issue, but the path problem was to the EnergyPlus tools. I fixed that and everything is working.

jmcneill's avatar jmcneill  ( 2015-08-13 11:32:45 -0500 )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


Question Tools



Asked: 2015-08-12 14:31:33 -0500

Seen: 203 times

Last updated: Aug 12 '15