Weird error of the _stat_file component in cold climates


I just wanted to report that for some reason the _stat_file component does not work when using some of the stat files contained in the zip files from

I’m creating a database and I have downloaded all the 15 thousand weather files from the climate periods 2004-2018 and for some reason, in some of them, the stat files are not read properly. All the EPWs are fine, but out of the more than 15k locations, 916 give the same error “ Solution exception:invalid literal for float(): N_A”. I assumed it was a problem with the component since the stat file seems to be good, is not corrupted, and contains the expected data. I first noticed it in all of the locations in Antarctica but then I realized there were many more including locations from the USA, Canada, Russia, and Scandinavian countries, is curious because most of them are cold climates.

Anyhow, I know that the problem may not be your fault, but I just found it weird. Here is a screenshot of the error, a list of the weather files where the error happened, and an example of the stat file that did not work.


ATA_GBR_Brunt.AWS-Halley.Research.Stn.890220_TMYx.2007-2021.stat (56.7 KB)

LocationsWithErrors.xlsx (105.6 KB)

Thanks for reporting, @dnlzepeda

It seems this issue is caused by there being aerosol optical depths available for certain months but not all of them:

I didn’t realize that this situation could happen for STAT files but, now that I think about it, there are certain months of the year that are in total darkness at these high latitudes. So there’s no use in getting these optical properties to estimate solar radiation when it doesn’t exist. I assume this explains why the issue only seems to affect cold climates.

In any event, I just pushed a fix that will enable the import of the other data when this situation happens:

You can get the fix on your end with the LB Versioner in an hour or so and thanks again for reporting!