Hi Craig, On Sun, 1 Mar 2009 22:41:08 -0800 Craig Citro <craigci...@gmail.com> wrote:
> > >> From command line of Sage 3.1.1, I saved some object, and then I > >> could open it with sage 3.2.3. Next I open test.sobj (this was > >> created by a sage program) in sage 3.1.1, saved it again, and > >> when I tried to open it on sage 3.2.3. Here you will find that > >> object: http://math.arizona.edu/~alara/test.sobj > >> > >> ----Alex > > > > Thanks. I'll take a look at it. I've also CC'd Craig Citro who > > most likely knows what is going on here. > > > > --Mike > > > > Hi Alex, > > Yeah, this one is going to be a little bit annoying to fix. Here's > what's going on: in between 3.1.1 and 3.2.3, fraction fields got moved > over to the new coercion model. This is good, but as it happens, the > switch was done in such a way that it caused the pre-existing pickles > to not load correctly (which is exactly what you're seeing). There's > probably a clean and classy way to fix this, and I'll be happy to look > at it carefully in a few weeks if no one beats me to it (I'm busy > trying to finish up my thesis). This is now trac #5419. I was the one who moved fraction fields to the new coercion model. This was #4360 on trac. Since I also moved the element class to cython, pickles broke with this change. This led to a fix for the general pickling strategy in Sage, which used the make_element method in sage.structure.element for all classes which didn't specify anything else. This fix was #4698. The pickles for Fraction Fields worked after these changes. The deprecation message is just a warning. It's just there to encourage the users to save their data in a newer format. The error I get when I try to load the .sobj file linked above in Sage-3.3 is: ... /home/burcin/sage/sage-3.3/local/lib/python2.5/site-packages/sage/structure/sage_object.so in sage.structure.sage_object.loads (sage/structure/sage_object.c:6156)() RuntimeError: (None, <function PolynomialRing at 0x1355e60>, (Fraction Field of Univariate Polynomial Ring in t over Finite Field of size 13, 'T', None, False)) invalid data stream invalid load key, 'x'. Unable to load pickled data. This looks a lot like the error we saw with your pickles at SD12. I thought that was because we were trying to unpickle compressed data at first? > In the interim, you probably want to hack something together so that > you can load your pickles. I managed to make sage 3.2.3 load the > pickles, but it's a pretty ugly hack, and you'll still need to re-save > the objects as newer pickles (which actually has one or two more > wrinkles), so that you don't have to deal with this in the short term. > How many of these files are there? If it's just a few, e-mail them to > me off-list, and I'll just re-pickle them in a newer format and send > them back to you. If there are more than that, I'll carefully explain > how you can fix them yourself. :) I don't have so much time to investigate this either, but if you already found the cause then I could probably write a clean patch. Can you explain how you managed to load the old files, or send your hackish patch to me? Cheers, Burcin --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---