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:

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?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to