You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When instantiating a UnitRegistry from cached files, the dimensional equivalents are instantiated as an empty dictionary. This results in all calls to get_compatible_units to fail with a key error.
importpintureg=pint.UnitRegistry(cache_folder=tmp_path)
t=ureg.get_compatible_units("L")
assertlen(t) >0ureg=pint.UnitRegistry(cache_folder=tmp_path)
t=ureg.get_compatible_units("L") # raises an error
I wasn't sure if the PR was a good solution or not for sure. Thanks for the response. If I have a chance to dig into this further I will give it a try.
When instantiating a
UnitRegistry
from cached files, the dimensional equivalents are instantiated as an empty dictionary. This results in all calls toget_compatible_units
to fail with a key error.The error in this particular stack trace is
The text was updated successfully, but these errors were encountered: