Sunlight Hours Analysis - Solution exception:max() arg is an empty sequence


Trying to figure out how to use the Sunlight Hours Analysis component in Ladybug. This text shows up:

  1. Solution exception:max() arg is an empty sequence.

From panel:

  1. Current document units is in Meters
  2. Conversion to Meters will be applied = 1.000
  3. Sunlight hours calculation time = 0.000 Seconds…
  4. Runtime error (ValueErrorException): max() arg is an empty sequence

line 2700, in gradientColor, “”
line 229, in resultVisualization, “”
line 436, in main, “”
line 457, in script

Used the script from here:,0

Anyone know what to do? Thanks!

Best regards

Hi tobias,
Can you please share your grasshopper definition?

Thanks for your reply @devang.

When i open the “Find when sun is visible to a point” file from hydrashare it looks fine, but when i rerun the script i get the error message. (526.1 KB)

Thanks for the file. I tried the file in rhino5 and 6 both. The error does not appear at my end.

Are using a different weather file? If yes. Can you please share?

Thank you for testing the file! :grinning:

Using this weather file:

Tried a different weather file and it still does not work. When I opened the file it looked ok, but when i rerunned the script i got the error message.

Used the same script on a different computer and it worked. I might have some issues due to some other plugins?

Please check absolute tolerance in Rhino in Tools>options>units. Mine is 0.01

Also using tolerance 0.01

Been checking the code for the current node. I will try to check a bit further with the two computers. Thanks for taking the time @devang, much appreciated.