Ordinal dictionary key error


I’m trying to assess the PMV comfort of a space with LBT 1.1.0. I haven’t found a way to create "dynamic clo values for the Clothing Insulation level apart from using the Ladybug_Clothing Function (0.0.69).

I got a list of 8760 values which I used to create a data collection, and plugged that into the LB PMV Comfort (1.1.0) component, which accepted it.

I tried to visualize the clo levels through the entire year, and plugged the constructed data collection into an Hourly Plot (1.1.0), which returned the following error:

Runtime error (AssertionException): Expected integer for ordinal_dictionary key. Got <type ‘float’>.
line 693, in ordinal_dictionary, “C:\Users\fb\ladybug_tools\python\Lib\site-packages\ladybug\legend.py”
line 71, in init, “C:\Users\fb\ladybug_tools\python\Lib\site-packages\ladybug\graphic.py”
line 125, in init, “C:\Users\fb\ladybug_tools\python\Lib\site-packages\ladybug\hourlyplot.py”
line 114, in script

Does anyone know how to solve this? I don’t even know what the error message means.:frowning:

It’s not urgent, I can use the old Ladybug_3D Chart (0.0.69) to visulize the inital float output, but I would be happy to understand what’s happening.:slight_smile: Am I doing something wrong?

This is what I’m after:

(Bonus question: where can I change the legend title and the chart title for Ladybug_3D Chart (0.0.69)? “SomeData: Clothing Insulation”, “SomeUnits: clo”, “SomeTimeStep: hourly”. I couldn’t find this…)

annual clo_hourly plot error.gh (30.3 KB)

@furtonb encountered a similar error and found that a small datatype conversion worked
dictionary_key_debug.gh (42.8 KB)
well to debug this.

Also attaching the worked-out gh file with GhPython script, which can probably solve your query.

That version of the plugin is pretty old at this point and there have been a lot of important bug fixes and new features since then. I recommend upgrading to LBT 1.6.

LBT 1.5 and above has a component called Clothing by Temperature, which is equivalent to that Legacy component but it can work with data collections. So I recommend using that.

Whatever bug you experienced there, it does not exist in LBT 1.6

Hi @chris,

Thanks for the reply. I recall dealing with this issue a few years ago, the proposed workaround did work and I used that workflow a few times since then. I wasn’t aware of the new component, thanks for highlighting it.

BTW, I’m usually on the latest stable build, at that time it was 1.1, now it’s 1.6. :slight_smile: