Skip to content

Occasional "Units are not convertible" errors #52

@JimBiardClimateAI

Description

@JimBiardClimateAI

I am calling Units.conform in a function called through xarray. The processing is running in multi-threaded mode, so the cfunits code is being accessed by multiple threads (potentially) simultaneously. The problem I am seeing shows up when I attempt to do a NULL conversion. That is, the code

    in_units_obj = Units("degrees_C")
    out_units_obj = Units("degrees_C")

    out_a, out_b = Units.conform((in_a, in_b), in_units_obj, out_units_obj)

sometimes (but not always) raises the exception

ValueError: Units are not convertible: <Units: degrees_C>, <Units: degrees_C>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions