1. Handler-python: 'module' object has no attribute 'model_to_json_grid_check' Handler-csharp: Exception has been thrown by the target of an invocation

I created a parametric model using Ladybug Tools and then run the analysis on Pollination but every time I connect the model as Input in the Pollination recipe, I get the following error in the setup runs: “1. Handler-python: ‘module’ object has no attribute ‘model_to_json_grid_check’
Handler-csharp: Exception has been thrown by the target of an invocation.”
The same script was not having any issues till yesterday 21:30 GMT.
Any solutions for that?

Hi @emilianoadam :wave:

It just had a look at your profile and it seems like you managed to schedule your jobs in the end. How did you resolve this issue in the end?

This was what I had this morning:

I then found out that by adding the “Honeybee Dump Object”, the script is able to create a hbjson file which can be connected to the Setup inputs and it’s not causing any problems.

1 Like

Hi @emilianoadam,

This error is happening because your libraries are not in sync. How did you install Pollination Grasshopper?

You should either update the ladybug tools libraries to the latest version or use the Rhino installer which installs both Rhino and Grasshopper with the latest dependencies.

You found the right solution here. This will fix the issue because now you are providing the hbjson file directly which means the handler is not needed anymore. What the handler does is translating the input honeybee model into an HBJSON file and also running a number of extra checks on the input model. In the process of this translation, it also runs a number of validations like checks to make sure your model has sensor grids.

Hi @mostapha and thanks for your reply. I installed Pollination Grasshopper using the download link: Pollination Grasshopper Plugin.
I’ve re-installed Rhino but that error keeps popping up. I’m still using the “dump object” tool to create the hbjson file, but yeah, it’d be better if the script worked without it. I am using ladybug tools 1.3.0 (should I use Ladybug tools 1.2.0?).

Hi @emilianoadam! Sorry for the

Can you try the update_ladybug component to update your installation to the latest version? This should resolve this problem.

Please don’t! :joy: That will cause more issues and you will see more missing handlers.


@mingbo and @chriswmackey, this is an example of what I was talking about when the recipe is being updated but since the dependencies for the handlers are not shipped with the recipe itself the user can face issues like this. We should work on a more informative error message for now until we can find a better solution to distribute the handlers.

Yes, I know we have a few of these cases on the forum. Hopefully, the recent improvement that we made to our CI will eliminate the time lag between when the latest recipe gets pushed to Pollination and when a Pollination Rhino installer that’s compatible with the new recipe becomes available.

Still, for all of these cases, running the LB Versioner (without any version_ input) and then restarting Rhino/Grasshopper will always fix them. So this is what I recommend for @emilianoadam and anyone else who is in need of a quick fix.

1 Like