Trouble creating heatmap

Hi everyone,

I am very new to grasshopper and ladybug. I followed a tutorial on youtube by Philipp Galvan Design: https://www.youtube.com/watch?v=Bmym1BQViuA

However, I can’t get the heatmap right. It says: 1. Solution exception:need more than 2 values to unpack.

Can anyone please help me?
Thank you.

Bumping this, I am also getting the same error with my heatmap component. Here is a full read out of the errors. I am trying to make a heat map to compare a simplified surface to a full detail surface. Here is a screen shot of my script and the full error read out.

Runtime error (ValueErrorException): need more than 2 values to unpack

Traceback:
line 29, in , “C:\Users\cameron.behning\ladybug_tools\python\Lib\site-packages\ladybug_radiance\intersection.py”
line 17, in , “C:\Users\cameron.behning\ladybug_tools\python\Lib\site-packages\ladybug_radiance\study\directsun.py”
line 35, in , “C:\Users\cameron.behning\ladybug_tools\python\Lib\site-packages\ladybug_display_extend_ladybug.py”
line 2, in , “C:\Users\cameron.behning\ladybug_tools\python\Lib\site-packages\ladybug_display_init_.py”
line 57, in script

1 Like

Looking around, it appears the problems came from this edit of the intersection.py file on November 14, 2023.
fix(intersection): Use radiance meshes in intersection calculation · ladybug-tools/ladybug-radiance@a846a22 (github.com)

the Third variable OBJ@MESH_EXE was added without a matching third value (presumable of “None”)added to the other side of the equals sign, resulting in the “need more than 2 values to unpack” error.
image

I edited by copy of intersection.py to have the third “None” value and can confirm that heatmap now works as anticipated. I don’t know how to make a pull/merge request else I would make that right now. @chris I see you made these edits and are active on the forums. Maybe you can issue an update?

@Iris991 you can make the change yourself as well.

  1. Navigate to “C:\Users\ YOUR USER NAME \ladybug_tools\python\Lib\site-packages\ladybug_radiance” and open the file intersection.py either in notepad or a formal code editor.
  2. Edit line 29, adding “, None” to the end of the line. Make sure to include the extra comma. (see picture for reference)
  3. Save and close intersection.py
  4. Close grasshopper and Rhino, then re open. Heatmap should now work.

It works!!! Thank you so much for your clear instructions.

Hi @cbehn ,

I’m really sorry for the late response here. I must have lost track of this post in the holiday shuffle.

Thank you so much for finding, reporting, and offering a fix for this bug. I think I must have never noticed it because this only affects machines that do not have an installation of Radiance. I just pushed a permanent fix here:

… which should be available with the LB Versioner shortly. Thanks again!

1 Like