Load model error, Rhino importing *.idf

Hi everyone!
I’ve not used the tools for month or so, so I’m a wee bit rusty.

while attempting to import an *.idf file upgraded from 9.6->22.2:

Failed to load model: System.ArgumentException: Command:
C:\Program Files/ladybug_tools\python\python -m honeybee_energy translate model-from-idf --output-file "C:\Users\TREVOR\AppData\Local\Temp\dhp4bwbf.p3c.hbjson" "C:\Users\TREVOR\Documents\_THM files\USSFCZ1AWHTSoilfurnaceunheatedbsmtIECC_2021.idf"
--- Logging error ---
Traceback (most recent call last):
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\honeybee_energy\cli\translate.py", line 334, in model_from_idf
    _run_translation_osw(osw, out_path)
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\honeybee_energy\cli\translate.py", line 687, in _run_translation_osw
    _parse_os_cli_failure(os.path.dirname(osw))
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\honeybee_energy\run.py", line 953, in _parse_os_cli_failure
    'Failed to run OpenStudio CLI:\n{}'.format('\n'.join(log_osw.errors)))
Exception: Failed to run OpenStudio CLI:
Cannot load IDF file at ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\ladybug_tools\python\lib\logging\handlers.py", line 70, in emit
    self.doRollover()
  File "C:\Program Files\ladybug_tools\python\lib\logging\handlers.py", line 394, in doRollover
    self.rotate(self.baseFilename, dfn)
  File "C:\Program Files\ladybug_tools\python\lib\logging\handlers.py", line 111, in rotate
    os.rename(source, dest)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\TREVOR\\.honeybee\\honeybee-energy.log' -> 'C:\\Users\\TREVOR\\.honeybee\\honeybee-energy.log.2022-11-09'
Call stack:
  File "C:\Program Files\ladybug_tools\python\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Program Files\ladybug_tools\python\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\honeybee_energy\__main__.py", line 4, in <module>
    energy()
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\honeybee_energy\cli\translate.py", line 336, in model_from_idf
    _logger.exception('Model translation failed.\n{}'.format(e))
Message: "Model translation failed.\nFailed to run OpenStudio CLI:\nCannot load IDF file at ''"
Arguments: ()
honeybee_energy.cli.translate - ERROR - Model translation failed.
Failed to run OpenStudio CLI:
Cannot load IDF file at ''
Traceback (most recent call last):
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\honeybee_energy\cli\translate.py", line 334, in model_from_idf
    _run_translation_osw(osw, out_path)
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\honeybee_energy\cli\translate.py", line 687, in _run_translation_osw
    _parse_os_cli_failure(os.path.dirname(osw))
  File "C:\Program Files\ladybug_tools\python\lib\site-packages\honeybee_energy\run.py", line 953, in _parse_os_cli_failure
    'Failed to run OpenStudio CLI:\n{}'.format('\n'.join(log_osw.errors)))
Exception: Failed to run OpenStudio CLI:
Cannot load IDF file at ''
   at Core.Utility.ExePythonCommand(String argument, String& results)
   at Core.Utility.IDFToHBJson(String idfPath, String saveAsPath)
   at Pollination.RH.Import.PollinationImport.RunIdfImporter(String filename, RhinoDoc doc, FileReadOptions options)

Freshly updated (and rebooted this time @m lol) PO installation.
Thanks!

idf in question:
idf_file.zip (33.9 KB)

Tested one of the ep222 example models, imported without issue, soo atleast there’s some answers!

Hey Chris! I can reproduce the error, but I can’t do much since the error message is empty.

Hey @tfedyna ,

I am not sure what version of honeybee-energy that you and Mostapha are using but I get an explicit error message when I import it:

[openstudio.energyplus.ReverseTranslator] <1> Idf file at path ='C:/Users/chris/Downloads/idf_file/USSFCZ1AWHTSoilfurnaceunheatedbsmtIECC_2021.idf' is not valid to draft strictness.
[openstudio.energyplus.ReverseTranslator] <1> Idf file at path ='C:/Users/chris/Downloads/idf_file/USSFCZ1AWHTSoilfurnaceunheatedbsmtIECC_2021.idf' is not valid to draft strictness.
[openstudio.energyplus.ReverseTranslator] <1> Check that IDF is of correct version and that all fields are valid against Energy+.idd.
[openstudio.energyplus.ReverseTranslator] <1> Check that IDF is of correct version and that all fields are valid against Energy+.idd.
[openstudio.energyplus.ReverseTranslator] <1> The collection is INVALID at strictness level 'Draft', because of the errors:
Field      level data error of type DataType          .
Error is in an object of type 'Schedule:Week:Compact', named 'RefrigeratorWeek', in field 1.
Additional information about the error type: field-level data is of an incorrect type.
[openstudio.energyplus.ReverseTranslator] <1> The collection is INVALID at strictness level 'Draft', because of the errors:
Field      level data error of type DataType          .
Error is in an object of type 'Schedule:Week:Compact', named 'RefrigeratorWeek', in field 1.
Additional information about the error type: field-level data is of an incorrect type.

Cannot load IDF file at ''
	C:/Program Files/ladybug_tools/resources/measures/honeybee_openstudio_gem/lib/from_openstudio/model.rb:110:in `translate_from_idf_file'
	C:/Program Files/ladybug_tools/resources/measures/honeybee_openstudio_gem/lib/measures/from_idf_model/measure.rb:91:in `run'
	:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:517:in `apply_measure'
	:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:114:in `block in apply_measures'
	:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:67:in `each_index'
	:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:67:in `apply_measures'
	:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/jobs/run_os_measures.rb:70:in `perform'
	:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/run.rb:291:in `step'
	:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/run.rb:233:in `run'
	:/openstudio_cli.rb:1174:in `execute'
	:/openstudio_cli.rb:804:in `execute'
	:/openstudio_cli.rb:1973:in `<main>'
	eval:188:in `eval'
	eval:188:in `require_embedded_absolute'
	eval:173:in `block in require_embedded'
	eval:167:in `each'
	eval:167:in `require_embedded'
	eval:126:in `require'
	eval:3:in `<main>'
Runtime error (PythonException): Failed to run OpenStudio CLI:
Cannot load IDF file at ''

Traceback:
  line 156, in script

It looks like your Compact schedule for RefrigeratorWeek is not following the IDF schema correctly.

When I open the file in the IDFEditor, I can see a bunch of IDF validation errors:

1 Like

Ah cool, ty!.
I’m upgrading some models from energycodes.gov for some stuff; I’m going to redo my install and do one of the upgrades manually and see where goes!

@chriswmackey reinstalled via PO RH installer: Weirdness cleared up, have the result you have now. ty!

1 Like