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
>>> import quantities as pq
>>> pq.__version__
'0.16.1'
>>> aa = pq.UnitQuantity("liter", pq.L, "liter")
>>> pq.CompoundUnit("1/liter")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/hjorth/HBP/Snudda/snudda_env/lib/python3.11/site-packages/quantities/unitquantity.py", line 376, in __new__
return UnitQuantity.__new__(cls, name, unit_registry[name])
~~~~~~~~~~~~~^^^^^^
File "/home/hjorth/HBP/Snudda/snudda_env/lib/python3.11/site-packages/quantities/registry.py", line 73, in __getitem__
return self.__registry[label]
~~~~~~~~~~~~~~~^^^^^^^
File "/home/hjorth/HBP/Snudda/snudda_env/lib/python3.11/site-packages/quantities/registry.py", line 30, in __getitem__
raise RuntimeError(f"String parsing error for `{string}`. Enter a string accepted by quantities")
RuntimeError: String parsing error for `1/liter`. Enter a string accepted by quantities
In 0.14.1 this worked...
Type "help", "copyright", "credits" or "license" for more information.
>>> import quantities as pq
>>> pq.__version__
'0.14.1'
>>> aa = pq.UnitQuantity("liter", pq.L, "liter")
>>> pq.CompoundUnit("1/liter")
1 (1/liter)
>>>
To make it even more confusing, if we call liter "litter" (double t) instead... it works in the latest version
>>> import quantities as pq
>>> pq.__version__
'0.16.1'
>>> aa = pq.UnitQuantity("liter", pq.L, "litter")
>>> pq.CompoundUnit("1/litter")
1 (1/litter)
>>>
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
In current version 0.16.1 this fails:
In 0.14.1 this worked...
To make it even more confusing, if we call liter "litter" (double t) instead... it works in the latest version
The text was updated successfully, but these errors were encountered: