UWG model simulation failed: local variable ‘e_wall’ referenced before assignment

Hi all,

I’m trying to run the DF UWG, but I’m getting the following error. I was wondering if anyone could help with this? Thank you!

  1. Solution exception:The UWG failed to run:
    UWG model simulation failed.
    local variable ‘e_wall’ referenced before assignment
    Traceback (most recent call last):
    File “C:\Program Files\ladybug_tools\python\lib\site-packages\uwg\cli\simulate.py”, line 50, in simulate_json_model
    uwg_model.simulate()
    File “C:\Program Files\ladybug_tools\python\lib\site-packages\uwg\uwg.py”, line 1352, in simulate
    self.RSM)
    File “C:\Program Files\ladybug_tools\python\lib\site-packages\uwg\urbflux.py”, line 71, in urbflux
    infracalcs(UCM, forc, UCM.road.emissivity, e_wall, UCM.roadTemp, UCM.wallTemp)
    UnboundLocalError: local variable ‘e_wall’ referenced before assignment

17042023 uwg.gh (171.4 KB)

Thanks for posting, @tmendis26 . It looks like you might have found a bug in the UWG and I’ll try to take a look soon.

Thanks a lot @chris ! Really appreciate it.

FYI, @tmendis26 . I’m sorry it took me a while but I just merged a fix in for the bug that you found:

It was a bug that only affects cases where all buildings in the dragonfly model have a MediumOffice program. The fix should be available with the LB Versioner within the hour.