Openstudio Honeybee Pinvoke error

Hi all, I am using the newest version of honeybee as well as the newest version of openstudio and when i set my export to open studio node to true, i receive the following and the node turns red.

  1. Current document units is in Feet
  2. Conversion to Meters will be applied = 0.305
  3. Current working directory is set to: c:\ladybug\unnamed\OpenStudio
  4. Runtime error (TypeInitializationException): The type initializer for ‘OpenStudio.OpenStudioModelCorePINVOKE’ threw an exception.
  5. Traceback:
    line 5397, in main, “”
    line 5677, in script
    line 5397, in main, “”
    line 5677, in script
    line 5397, in main, “”
    line 5677, in script
    line 5402, in main, “”
    line 5682, in script
    line 5402, in main, “”
    line 5682, in script
    line 5402, in main, “”
    line 5682, in script
    line 5402, in main, “”
    line 5682, in script
    line 5402, in main, “”
    line 5682, in script

I tried updating all of the honeybee components and using an older version of openstudio but that did not work. any ideas?

1 Like

@chris
I am having the same problem using the legay plugins. After installing the latest LBT v.1.0.2 and the latest legacy plugins, I get the same pininvoke error. Is this because the legacy pluginns are not compatible with openstudio 3.0.1?
I also installed openstudio 3.0.0 but this did not help. Honeybee imports the 3.0.1 version.

@Tstull and @Erikbeeren ,

No, this is because, if you want to use OpenStudio 3.0.1 with the legacy plugin, you have to follow this one step here:

Alternatively, if you want to leave your legacy using an older OpenStudio but ensure that the new LBT plugin is using OpenStudio 3.0, you can install OpenStudio 3.0 in your C:\Users\[USERNAME]\ladybug_tools folder as is recommended in the installation instructions. The Legacy plugin won’t know to look in the ladybug_tools folder but the new LBT plugin will find OpenStudio at that location.

3 Likes

:slight_smile: Nice it works again!

Hi @Chris,

Could it be, that running Openstudio 3.0.1 with Honeybee legacy is causing problems with the read .eio file.
I am getting the folowing message:

  1. Solution exception:invalid literal for float(): Sensible

On the forum I got this information about older versions.

Hi @Erikbeeren ,

I know that the .eio file format changed with newer versions of EnergyPlus but the latest eio component seems like i’s able to parse the results:

Are you using the same version of the component as in the image?

Hi @ Chris,

Yes I use the same version. When I tested it without ironbug I was able to read the eio file.
So probably Honeybee is not the problem.

When I added a system with Ironbug, the problem occurs. So Perhaps I have to ask @MingboPeng

Hi @Erikbeeren,

I am not sure what happened here. I just did a quick test, eio file is there and working fine.

Could double check if output folder to see if eio file is there?

Hi @MingboPeng,

I tested with Ironbug version V0.0.16, Energyplus version 9.3.0 and openstudio 3.0.1

  • Without Ironbug all goes well

  • With system 1 no problem either

  • With system 8 the simulation gives the following error:

Runtime error (InvalidCastException): Unable to cast object of type ‘OpenStudio.AirTerminalSingleDuctParallelPIUReheat’ to type ‘OpenStudio.ZoneHVACComponent’.

  • With system 06, 07 and 11 I can not read the eio file. It gives me the folowing error:
  1. Solution exception:invalid literal for float(): Sensible

After deinstaling openstudio 3.0.1 and using openstudio 2.9.1 and energyplus 9.0.0 most problems were solved. Only system 8 is still giving the same error.

Hi @Erikbeeren, thanks so much for your tests, there are a several updates from OpenStudio 3.0 on AirTerminals. I will try to address them today, and will keep you posted when it is ready.

Hi @Erikbeeren,

I took a closer look at the problem of system 8. It seems I accidentally add the air terminal to zone equipment in ThermalZone in the system 8 template. If you change it to air terminal will fix the issue.
image

In terms of eio issue, it is more related to how “Honeybee_Read HVAC Sizing (readEIO)” component reads the eio file. If you double click this component, and edit the line 91 with following, it should fix it.
image

1 Like

Thank you @MingboPeng

I added @MingboPeng 's patch into the legacy component:

… but I would really recommend switching to the LBT plugin in the near future. The “HB Read HVAC Sizing” component in the LBT plugin that reads the sizing info from the SQL file instead of the EIO file is a lot more robust and error-proof for cases like this.

1 Like

Hi @chris,

I am going to implement the new LBT plugin next week in our workflow, but for all old simulations I need still the legacy pligin. That is why I ran into these issues.
But still thank you, for all the efforts!

1 Like