Heron GDAL error 'OSGeo.GDAL.GdalPINVOKE' threw an exception

Any ideas about what is going wrong and how to fix it? I installed Heron from the PackageManager in Rhino 8. Thanks in advance.

  1. Solution exception:The type initializer for ‘OSGeo.GDAL.GdalPINVOKE’ threw an exception.

Hi @Soporte3 ,
Can you try loading Heron from disk as described here:

-Brian

Thanx Brian… loading Heron from disk worked fine just once, then I installed Human via PackageManager and threw this new error:

  1. 8840f75be1e66b9f12d2493f2455b7a2
  2. Solution exception:The type initializer for ‘OSGeo.OSR.OsrPINVOKE’ threw an exception.

HI!
do you solved?

same issue
tried to load from disk, work once, than nothing.

I updated Heron to v0.4.3 a couple weeks ago and tried a new approach to resolving the issue of finding the GDAL libraries. Are you using v0.4.3?

-Brian

I’m using v.0.4.4

Same here, though on Mac (Apple Silicon) and using 0.4.2.1
No luck with disk loading enabled.

Anything I can do to help debug?

I usually activate Grasshopper plugins by moving them into the Components folder. That’s what I did in this case as well, which resulted in the issue described above. What solved my problem was deleting the plugin from that folder and then installing it through the pop-up window in Rhino that asks about the missing component and offers to install the plugin. The plugin then ends up in a different location, and the libraries work correctly.

I tried following the steps outlined online to install the plugin on Grasshopper for Mac. However, I’m still running into the infamous

1. Solution exception:The type initializer for 'OSGeo.OGR.OgrPINVOKE' threw an exception.

What I’ve tried:

  • Installed the plugin with the Package Manager.
  • Installed the plugin by copying the content of the (latest) release folder to the GH Components (Libraries) folder
  • Loading the plugin from disk in both cases.
  • Installing GDAL locally on the system. ( brew install gdal)
  • Adam’t trick to remove the folder and install Heron from the Missing Plugin window.

I’ve seen a lot of people struggle with this issue, but haven’t found a proper fix?

@Brian_Washburn Happy to help debug, but not sure where to start.

If you are on a Mac with Apple Silicon, can you try running Rhino using Rosetta?

Heron for Mac was compiled on my old Intel Mac with x86 GDAL dylibs. I’ve been planning to update to osx dylibs, but this is part of a larger effort to update my developer environment to be cross-platform, which admittedly, is taking me too long.

-Brian

Good morning Brian!

I am having trouble getting Heron working on my Mac Mini m4
I’ve tried with both Rhino 7 and 8

On Grasshopper settings I have set Heron to run from disc

The component I’m trying to use is RestRaster

______

On Rhino 7 with Heron 0.3.8 installed via PackageManager
as soon as I connect the ESRI World Imagery to the URL input (and have the get input as True) I get an error:

  1. Solution exception:The remote server returned an error: (500)

______

On Rhino 7 with Heron 0.4.2.1 installed via PackageManager
I get a remark and an error:

  1. Heron’s Spatial Spatial Reference System (SRS): WGS84

1. The remote server returned an error: (500)

______

On Rhino 8 with Heron 0.3.8 installed via PackageManager and Rosetta checkmark

1. Solution exception:PROJ: proj_create_from_database: Cannot find proj.db

______

On Rhino 8 with Heron 0.4.2.1 installed via PackageManager and Rosetta checkmark

With component from your example of v0.3.8

1. Solution exception:Object reference not set to an instance of an object.

With new component

1. Heron’s Spatial Spatial Reference System (SRS): WGS84

1. Value cannot be null. (Parameter ‘value’)

______

On Rhino 8 with both Heron 0.3.8 and 0.4.2.1 installed via PackageManager (without Rosetta)

1. Solution exception:The type initializer for ‘OSGeo.OSR.OsrPINVOKE’ threw an exception.

______

I’ve got the feeling that the closest to working is Rhino 7 with Heron 0.4.2.1

Any ideas how to get it across the finish line?

Thank you very much

Hi @Andrés_Martínez_C ,

Can you post the definition that is not working for you? The remote server 500 error can be because your boundary is too small (double check your units), or there is no data within the boundary (make sure you have the EarthAnchorPoint set).
-Brian

HeronMac_Example_v0-3-8_.gh (49.1 KB)

I’m using a file you uploaded in another thread.

I actually just tried Heron on a Windows computer it was working perfectly previously on version 0.3.9 and it is no longer working either (REST Raster component)

Did they arcgis change something in their backend?

I was able to get this to work in Rhino 8 (rosetta) with Heron 0.4.2.1 using the file you uploaded. Make sure the EarthAnchorPoint is set.

-Brian

Hmm mine decided not to work for some odd reason