Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

NameError: name 'Integer' is not defined

Hi, all of a sudden, I'm experiencing a strange error and cannot find any solution for it. Sage itself works fine, but as soon as I try to load any .sage file, the application can't start. Inside sage I can do any calculation/operation as usual, but if I for example load an application that contains:

a=1
b=2

sage returns:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-1-496f9e9073df> in <module>()
----> 1 load("u.sage")

sage/structure/sage_object.pyx in sage.structure.sage_object.load (/build/sagemath/src/sage-7.4/src/src/build/cythonized/sage/structure/sage_object.c:12333)()

/usr/lib/python2.7/site-packages/sage/repl/load.pyc in load(filename, globals, attach)
    245             if attach:
    246                 add_attached_file(fpath)
--> 247             exec(preparse_file(open(fpath).read()) + "\n", globals)
    248     elif ext == '.spyx' or ext == '.pyx':
    249         if attach:

/usr/lib/python2.7/site-packages/sage/structure/sage_object.so in <module>()

NameError: name 'Integer' is not defined

Yesterday everything was working fine. I hadn't done any system upgrades and the error appears on programs written and working yesterday and on new written programs.

Does anyone know how to solve this error or where it suddenly comes from? A restart didn't change anything...

click to hide/show revision 2
retagged

NameError: name 'Integer' is not defined

Hi, all of a sudden, I'm experiencing a strange error and cannot find any solution for it. Sage itself works fine, but as soon as I try to load any .sage file, the application can't start. Inside sage I can do any calculation/operation as usual, but if I for example load an application that contains:

a=1
b=2

sage returns:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-1-496f9e9073df> in <module>()
----> 1 load("u.sage")

sage/structure/sage_object.pyx in sage.structure.sage_object.load (/build/sagemath/src/sage-7.4/src/src/build/cythonized/sage/structure/sage_object.c:12333)()

/usr/lib/python2.7/site-packages/sage/repl/load.pyc in load(filename, globals, attach)
    245             if attach:
    246                 add_attached_file(fpath)
--> 247             exec(preparse_file(open(fpath).read()) + "\n", globals)
    248     elif ext == '.spyx' or ext == '.pyx':
    249         if attach:

/usr/lib/python2.7/site-packages/sage/structure/sage_object.so in <module>()

NameError: name 'Integer' is not defined

Yesterday everything was working fine. I hadn't done any system upgrades and the error appears on programs written and working yesterday and on new written programs.

Does anyone know how to solve this error or where it suddenly comes from? A restart didn't change anything...