LB EPW _stat_file error

Hello,
I am trying to get the extreme cold/hot week using the _stat_file component. But I receive the error “1. Solution exception:index out of range: 0”. I have tried it for multiple locations, so I suppose the location or the availability of data is not the problem.
What am I doing wrong?
I am using Grasshopper in Rhino Version 7 (7.36.23346.16352, 2023-12-12), in MacOS Sonoma 14.2.1 (23C71). LB Version 1.7.47

It doesn’t work in the sample files received with LB either

Hi, I have some recommendations

  1. Use a local stat file, check the file before giving it to component
  2. Use lb veesioner to update your ladybug tools to solve some issues
  3. Use weather converter tool which is installed with energy plus on your machine and create new stat file from the epw

Thank you @hossein_nazari for the recommendations. All of them still return the error “1. Solution exception:index out of range: 0”
The stat file is not empty and has all the necessary data.

I check the problem on mac and every thing is ok with this file
https://climate.onebuilding.org/WMO_Region_2_Asia/IRN_Iran/TE_Tehran/IRN_TE_Tehran.Mehrabad.Intl.AP.407540_ITMY.zip
and this is the result


could you assign the folder location? it seems it’s a little buggy!

Thank you again for the prompt response. Unfortunately, it still doesn’t work for me on Mac.

I tried it on my old Windows computer, and it works. But on Mac it still doesn’t.

could you update your Rhino to the latest version update? then update you ladybug tools and try again, I use Rhino 8 latest version on my mac

Unfortunately, I only have an educational license for Rhino 7. I could try the evaluation version for 8, but doesn’t make much sense since I would have to go back to 7 eventually.
@chris is there any other solution?

Ok, check the rhino 7 latest sub version
from rhino option, general , set to release candidate and check for update

Thank you, that’s already set to “enable check for updates” and Rhino is updated to the latest version.
I checked with Rhino 8 and it works there. But this doesn’t solve my issue as I have to use 7. Many thanks for your support

Sorry for such a late response, here, @SuNa and thank you, @hossein_nazari for helping debug. You definitely made a lot of progress with narrowing down the issue.

Given that you’re getting this error with pretty standard weather files and its working correctly for you on your Windows machine and in Rhino 8, I think the problem is likely some specific setting on your Mac, which is related to Rhino 7. If you can double click the center of the Stat component and hit “Test” (or I think it’s a Play button on Mac), then send a screenshot like this:

That would allow me to see the exact line of code where the error is coming from. Then, I might be able to suggest a way to work around it.

Hi @chris, thanks for getting back.
Here is the screenshot:

Thanks, @SuNa ,

The exact line of the failure is here:

I can think of two possible explanations:

  1. Perhaps the download of this particular Stat file did not complete successfully and you ended up with a partial file. If this were the case, you can try deleting the following folder on you machine:
/Users/[USERNAME]/ladybug_tools/resources/weather/[NAME_OF_WEATHER_FILE]

Then, try running the whole Grasshopper script again, which will re-download the files.

  1. Perhaps this is just a Stat file that is using a very different convention for the Location, which I have not seen before. If that is the case, can you either upload the Stat file or paste the URL to this particular weather file?

That will help me recreate the issue on my end so that I can push a fix for this case.

Thanks @chris for taking the time to check.
I tried rerunning the script with different weather files, but it didn’t work.
The same Stat file as in the screenshot works on Rhino 8 and Rhino 7 in Windows.
Here is the link to the Stat file:
https://climate.onebuilding.org/WMO_Region_2_Asia/IND_India/DL_Delhi/IND_DL_New.Delhi-Safdarjung.AP.421820_TMYx.zip

1 Like

Thanks, @SuNa .

I figured out that the issue with your Mac is that it lacks the encodings to correctly interpret the degree symbol into a UTF-8 character as seen here in the STAT file:

image

I think that I have a fix here, which will treat the symbol as “any character,” thereby allowing you to parse the STAT file on your machine:

The fix is now available with the LB Versioner component. If you could try running it and seeing if that fixes the issue for you, I would appreciate it.

1 Like

Many thanks, @chris. It works now! :smiley:

1 Like