Parametric daylight analysis 1. Solution exception:'NoneType' object has no attribute 'X'

I tried running a parametric daylight analysis. I used a script that is similar to @Mostapha’s example file that is uploaded here. I get the following error, although all parameters are correct.

  1. Solution exception:‘NoneType’ object has no attribute ‘X’

I don’t get this error when I run @Mostapha’s file. I would really appreciate your inputs. (616.9 KB)
Mostapha_ (529.6 KB)