-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different-registries error after pickle dump-load #725
Comments
You need to set the application registry. We are currently reworking this to make it more user friendly,. |
Set the application registry how? from pint import UnitRegistry
units = UnitRegistry(auto_reduce_dimensions=False) then use |
After some digging, it looks like this is very straightforward: |
This should be fixed in master. |
I have saved a pint Quantity into a file with
pickle.dump(...)
then loaded it in a different program execution withpickle.load(...)
.In both program executions I create the UnitRegistry in exactly the same way.
However, when comparing or mixing a Quantity that is obtained from the .pkl file via
pickle.load(...)
and a Quantity that is created in the current program execution via the UnitRegistry, I get the error:Following the instructions in the tutorial,
my understanding is that in this circumstances everything should work fine. What may be the problem or my misunderstanding?
The text was updated successfully, but these errors were encountered: