Simon King
unread,Sep 27, 2019, 6:28:48 AM9/27/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-...@googlegroups.com
Hi!
Trying to make my group cohomology package work in both py2 and py3, I
already thought it was done, but I found that a pickle created with py3
cannot be read by py2. It would of course be possible to argue that people
are unlikely to unpickle a py3 pickle with py2, and since unpickling a
py2 pickle with py3 seems to work, we shouldn't care.
But just in case I wanted to ask if you know of an easy fix.
According to explain_pickle, the following happens:
sage: pg_RESL_sparse_unpickle_class =
unpickle_global('pGroupCohomology.resolution', 'RESL_sparse_unpickle_class')
sage: si1 = unpickle_newobj(pg_RESL_sparse_unpickle_class, ())
Traceback (most recent call last):
...
UnpicklingError: NEWOBJ class argument isn't a type object
What does that error mean? In fact, the class IS a type:
sage: from pGroupCohomology.resolution import RESL_sparse_unpickle_class
sage: isinstance(_, type)
True
Best regards,
Simon