Ladybug Sunlight hours analysis error

Hello, I’m trying to run a previously created file and running into an error which I had not previously encountered. (Seen in Image with Error Report)

The model itself is rather large, so the Grid size makes sense for it. Any help would be great, thank you.

1 Like

I’m having exactly the same error. Also, I cannot run a Radiation analysis, I get the error:

selectedSkyMtx failed to collect data! Use selectSkyMtx component to generate the selectedSkyMtx.

Do you happen to have RhinoInsideRevit or pyRevit installed? I’m wondering if I’ve been messing too much with the ironPython situation on my machine.

I discovered the issue.

I had set the scriptcontext doc to Rhino, which does exactly this. I removed the offending script and restarted Rhino and it worked fine.

Is your issue resolved? What you referred to is an old post. That issue should not happen in latest components. Please share should the error remains.

I made an error in my previous python component and didn’t call sc.doc = ghdoc at the end. I was frustrated though, because adding it in didn’t seem to effect the error. But I just did a test with a simple script and adding sc.doc = ghdoc at the end of a script released it. I think it was just a computational order error.

Unless you are saying that it should work despite a python component calling sc.doc = Rhino.RhinoDoc.ActiveDoc without adding sc.doc = ghdoc? In which case it does break the HB components.

That’s what I mean. Can you please share a sample file for us to debug?

No problem. This script has a toggle to either allow sc.doc = ghdoc to be called (True) or not (False). If set to True and recomputed, Radiation Analysis works fine. If not, I get the error “selectedSkyMtx failed to collect data! Use selectSkyMtx component to generate the selectedSkyMtx.”

Which, actually, in doing some digging, is a failure in RadiationAnalysis
line 256: analysisMesh, analysisBrep = lb_preparation.cleanAndCoerceList(geometry)
which returns empty and in turn causes
line 266: analysisSrfs = analysisMesh + analysisMeshedBrep
to be empty which in turn causes
line 103: elif cumSky_radiationStudy != None and (len(cumSky_radiationStudy) == 456 or len(cumSky_radiationStudy) == 1752) and analysisSrfs:
to return false, which causes the selectedSkyMtx error. (403.6 KB)

Thanks for the file @sleaman. Unfortunately, I am unable to re-create the error at my end. I would also share that I have not encountered this error. I always use meters as a unit in Rhino and 0.001 as absolute tolerance. What settings are you using?

Same settings, it doesn’t seem to make a difference. Just to check, when you open the test file with a fresh instance of Grasshopper, it won’t fail unless the Python component toggle is set to False and you recompute.

All I can think is that I may have caused issues with my IronPython install when I also installed pyRevit and RhinoInsideRevit, though I’m not sure what I could have done there. My version of IronPython is IronPython 2.7.5 ( on .NET 4.0.30319.42000 (64-bit).