Local EPW file Recognized in Legacy 0.0.69 but not Version 1.3.0

Was given a purchased EPW file and tired to get it to work on the LB Import EPW but it is giving the following error:

"1. Solution exception:invalid literal for int() with base 10: ‘’

However it worked with the Open epwFile version 0.0.69 Ladybug Import EPW file, please see image below.

Not sure what is going on here?

Looks like your EPW isn’t following the EPW file schema. At least one of the fields contains invalid data.

Would you be able to upload the file and I can tell you which field is the problematic one? Maybe I’ll also make a tweak to ladybug depending on how severe a violation of the EPW schema this is.

Attached is the zipped file


Magna_SaudiArabia_TMY-15_607141413.zip (184.6 KB)

@chris I was wondering if you were able to take a look at that TMY file schema and ascertain the issue?


Hi @cflynn29 - the error is because of the missing fields in the header. I copied the lines from another nearby location and it should work fine now.

Magna_SaudiArabia_TMY-15_607141413.zip (185.2 KB)

We should probably be more forgiving for parsing the header but I leave that decision to @chris.

1 Like

Thanks for finding a solution, @mostapha , and for posing the file, @cflynn29 . Now that I see the file, this actually isn’t as big of a violation of the EPW schema as I was thinking and it’s possible that my importing methods were just a little too strict. I pushed a fix that will allow this EPW to be imported:

So people shouldn’t experience an error for this case going forward.

Hi Chris,

I’ve updated to V1.3.0 but a different issue has come up

  1. Solution exception:invalid literal for float(): 275.0"

and I tried the fix that Mostapha suggested and am still getting that issue and i’ve attached the epw file as well. So i dont get whats the issue with the schema
Celina_TMY15_WA.zip (435.5 KB)

Hi @cflynn29, You should try version 1.4.0 - it works with no issues.

1 Like