If I wanted to apply the patch now, how could I do that. I have looked around the sage wiki and other sources for info, but I can't seem to find any as all of the guides focus on pushing changes to mercurial, rather than applying a patch.
On Dec 30 2008, 5:48 pm, "William Stein" <[email protected]> wrote: > On Tue, Dec 30, 2008 at 1:32 PM, M. Yurko <[email protected]> wrote: > > > I have recently been using save_session a bit, and I uncovered what I > > believe is a bug. If the worksheet of the session that I'm trying to > > save contains a cython function, then load_session chokes. For > > example: > > This is a bug. Thanks for reporting it. We're tracking it > here:http://trac.sagemath.org/sage_trac/ticket/4894 > I expect to post a fix soon. > > The best workaround I can suggest for now is to explicitly save all > the variables you want to save. Obviously that isn't nearly as nice > as save_session. > > William > > > > > > > var1 = 1 > > var2 = 2 > > var3 = srange(1,10000) > > var4 = range(1,3000) > > var5 = 1234.123456 > > > %cython > > def test(double x): > > return x > > > save_session('test_session') > > > and then I save and exit, and re-enter the worksheet > > > load_session('test_session') > > > and I get > > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > File "/home/myurko/.sage/sage_notebook/worksheets/admin/28/code/ > > 1.py", line 6, in <module> > > load_session(\u0027test_session\u0027) > > File "/home/myurko/sage-3.2.1/local/lib/python2.5/site-packages/ > > SQLAlchemy-0.4.6-py2.5.egg/", line 1, in <module> > > > File "session.pyx", line 300, in sage.misc.session.load_session > > (sage/misc/session.c:1403) > > File "sage_object.pyx", line 477, in sage.structure.sage_object.load > > (sage/structure/sage_object.c:4865) > > File "sage_object.pyx", line 598, in > > sage.structure.sage_object.loads (sage/structure/sage_object.c:6121) > > RuntimeError: No module named > > _home_myurko__sage_sage_notebook_worksheets_admin_28_code_sage8_spyx_0 > > invalid data stream > > invalid load key, 'x'. > > Unable to load pickled data. > > > When I ran save_session with verbose = true, I noticed that it saved > > test, which according to the docstring shouldn't have happened. Does > > anyone have any workarounds for this issue? > > -- > William Stein > Associate Professor of Mathematics > University of Washingtonhttp://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
