i am trying for the first time to use this new updated version of HoneyBee and LadyBug with the openstudio component for running energy simulations and i have got this error:
1. Solution exception:The type initializer for ‘OpenStudio.OpenStudioModelCorePINVOKE’ threw an exception.
Some of you have any idea??
I thought it was a problem of updating the components but i think that all the components are updated (some of them were manually updated).
Can someone help me?
I have attached the gh and rhino files also
Thanks a lot in advance
20160908_updated.gh (720 KB)
20160908_Updated.3dm (1.4 MB)
Hi Claudia, Have you been using OpenStudio with no issues before? This is an OpenStudio issue and we can’t do much about it. Read this discussion for a similar issue: http://www.grasshopper3d.com/group/ladybug/forum/topics/cannot-expo…
As the discussion Mostapha posted suggests, make sure that you are using the most recent version of OpenStudio. If you are, then I am sorry that you are one of the few out of 100 users who experience this OpenStudio error. Hopefully, this will be fixed soon. There’s also more info on the bug here:
Just for the record, I have also been experiencing the same error. I have updated my version of HB and LB to the most recent version and have installed OpenStudio 1.14.0. I have restarted my computer and none of these things seems to have solved the problem.
Hi Nick, Have you also tried OpenStudio 2.0? We hope OpenStudio 2.0 to address this issue. The libraries and the dependencies are much cleaner now and should hopefully address this issue.
Mostapha summed it up. Dan Macumber of OpenStudio team believes that the new OpenStudio 2.0 should nip this issue in the bud and we’ve tested it a bit as you can see on this issue:
You can download a pre-release of OpenStudio from the OpenStudio github here:
Keep us posted if it test it out and let us know if it fixes your issue.
There is caveat here. OpenStudio 2 by default installs openstudio 2.0 under program files(x86) and with a different naming style. If you want Honeybee to find it then you should replace the libraries manually (copy them to 1.14).
I have realized that there are issues with the EnergyPlus translators in OpenStudio 2.0.0 but these should hopefully be fixed in the next OpenStudio release:
Until this gets fixed, you are probably still going to have PINVOKE issues. Keep your eyes peeled for the next OpenStudio release and this should hopefully address the problem.
I have installed the newest version of OpenStudio and am still having the same problem. Have there been any recent measures to fix the problem?
Honeybee now supports OpenStudio 2.x. So you should update your honeybee components, download the latest stable release of OpenStudio:
…and install it in the default location (off of the C:\ drive). Then you should be all set.
Despite trying all of your suggestions, I am still having issues with the **OpenStudio.OpenStudioModelCorePINVOKE **error. Is this something that is wrong with my computer, rather than the software? I am looking for a reason to have my company upgrade my laptop, so if you have any suggestions I’d be very open to them.
Hi Nikc, The error is a dependency issue. If you have all the dependencies installed and unblocked it should go away. Take a look at this discussion.
Hello, I am also having this same issue, getting a “1. Solution exception:The type initializer for ‘OpenStudio.OpenStudioModelCorePINVOKE’ threw an exception.” red error message. Trying to run this example file: http://hydrashare.github.io/hydra/viewer?owner=chriswmackey&for…
When I first ran dependency walker, I got errors about missing .dll files. I downloaded the .dll files noted as missing, but am still not able to resolve the issue. (Now I get dependency walker errors about different CPU types - see attached screenshot.)
I am running Windows 7 on a parallels virtual machine hosted on a MacBook Pro, if that matters at all.
Yesterday I had the same issue with a machine that runs on Openstudio 2.1. It was working before and just yesterday I got this error. When I updated Openstudio to 2.3, the issue was solved.
@LauraCuccaro I’m running on a virtual machine on Macbook Pro with no issue.
I have been having the same issue with both Open Studio 2.4 and 2.5. It would be nice to know why this happening and how can one fix it.
We had thought that this issue was getting better in OS 2.5 but thanks for letting us know. I think we’ve realized that it has something to do with the permissions assigned to Rhino as an application on your computer. Also, I had noticed that all of the cases I’ve seen in the past year were for computers issued by IT departments, which makes me think some security feature is playing a role. Is your computer a personal one or one that came from an IT department?
OpenStudio team also said that they would veuild a diagnostic tool to help us understand this more. Once they manage to roll it out, I will post back here.
We have come to the conclussion that this has also something to do with an ovejealous antivirus system. Panda for example is known to have such an effect on open studio.
I do find in some cases that the CSharp dll come with the OpenStudio installer doesn’t work with some computers, and works with no error once I replace those dll files with what I downloaded from nuget package that OpenStudio published for .Net developers.
Here is the link: https://www.nuget.org/packages/OpenStudio/
Thanks for the info MingboPeng.
Just to clarify, do you suggest simply unistalling the current version of openstudio in one’s terminal, and then installing the version published in nuget?