When I attach a simple .sage file in a notebook I get "name 'Integer' is not
defined".
The notebook expression is:
attach('/path/to/agcd.sage')
The file contains:
x=1
This works from the Sage command line. It fails in notebook each time I
evaluate the expression.
Sage version:
'Sage Version 5.12, Release Date: 2013-10-07'
OS: Ubuntu 12.04 LTS 64-bit under VMWare 9
Installed from Ubuntu 64-bit binary distribution.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_3.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n"
+
_support_.preparse_worksheet_cell(base64.b64decode("YXR0YWNoKCcvaG9tZS9zdGV2ZS9Eb2N1bWVudHMvUENUX3ByaW1lL2FnY2Quc2FnZScp"),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpVI0sMx/___code___.py", line 2, in <module>
exec compile(u"attach('/home/steve/Documents/PCT_prime/agcd.sage')" + '\n',
'', 'single')
File "", line 1, in <module>
File "lazy_import.pyx", line 344, in
sage.misc.lazy_import.LazyImport.__call__ (sage/misc/lazy_import.c:2550)
File
"/opt/sage-5.12-linux-64bit-ubuntu_12.04.3_lts-x86_64-Linux/local/lib/python2.7/site-packages/sage/misc/attached_files.py",
line 344, in attach
load(filename, globals(), attach=True)
File
"/opt/sage-5.12-linux-64bit-ubuntu_12.04.3_lts-x86_64-Linux/local/lib/python2.7/site-packages/sage/misc/preparser.py",
line 1768, in load
execfile(preparse_file_named(fpath), globals)
File "/home/steve/.sage/temp/ubuntu/14825/agcd.sage6EZlGm.py", line 5, in
<module>
_sage_const_1 = Integer(1)
NameError: name 'Integer' is not defined
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.