Can not generate a UWG epw file


I am trying to generate an EPW file with th DF Urban Weather generator.
In doing so I get the following error:

Runtime error (DivideByZeroException): Attempted to divide by zero.

line 86, in script
line 154, in average_shgc, “C:\Users\ebe.KNR\ladybug_tools\python\Lib\site-packages\dragonfly_uwg\properties\”
line 35, in model_to_uwg, “C:\Users\ebe.KNR\ladybug_tools\python\Lib\site-packages\dragonfly_uwg\”
line 48, in run_uwg, “C:\Users\ebe.KNR\ladybug_tools\python\Lib\site-packages\dragonfly_uwg\”

I do not understand why this is hapening. Below the json file:

GEUT_08.7z (164.3 KB)

What a coincidence! The same bug was just reported here yesterday and I merged a fix a couple of hours ago:

Thanks for reporting!

1 Like

Hi @chris,

I updated Ladybug and even added windows to the model. Now it generates an UWG.json but no EPW file. I tried to simplify the geometry but with no luck. Now I do not know what could be the issue here. (416.4 KB)
in.bat (398 Bytes) unnamed_uwg.json (3.9 KB)

I should be better at parsing the error log from the UWG. Here’s the error that you get when you run the in.bat file:

It looks like your model is somehow getting “5C” assigned as its climate zone. I’ll see if I can investigate further. But you can always change this to 5A in you .json file and then rerun the .bat file.

I just pushed a fix to the development version of the plugin, which should address this case:

You should be able to get it with the Versioner shortly. Thanks for reporting @Erikbeeren !

1 Like

Hi @chris,

Again having trouble with generating UWG epw files. Error message:

The Urban Weather Generator Failed to run.


Somehow the batch file does not run correctly. The UWG.json is created but urban epw not.

DF.7z (310.8 KB)


Funny when I save the file as a DFJson and import this to generate a uwg epw file everything wirks fine.


I think I found the reason. When I defined the folder path the error occured.

Thanks for reporting this, @Erikbeeren .

Hm. I think the original issue might actually have been related to the obstacle height that you have in your successful case there since I was able to get a math domain error in the wind profile calculation with your original uploaded file. I just pushed a fix that will catch the case of the failure of the UWG here:

You should be able to get it with the LB versioner in an hour or so if you still need it.

1 Like