Ladybug Sunlight hours analysis error

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.