Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error Loading file in sage

I am trying to use Sage on a mac and am not particularly computer savvy (e.g. I still haven't figured out what I am meant to do with PATH and find the installation documentation a bit forbidding). I am running sage from the command line from a particular folder which contains a file "test.sage" but when I put 'load("test.sage")' I get the following error message:

TypeError Traceback (most recent call last) <ipython-input-2-d772665a10d5> in <module>() ----> 1 load("test.sage")

/Applications/SageMath/src/sage/structure/sage_object.pyx in sage.structure.sage_object.load (/Applications/SageMath/src/build/cythonized/sage/structure/sage_object.c:11186)()

990 
991     if sage.repl.load.is_loadable_filename(filename):
992         sage.repl.load.load(filename, globals())
993         return
994

/Applications/SageMath/local/lib/python2.7/site-packages/sage/repl/load.pyc in load(filename, globals, attach)

288             if attach:
289                 add_attached_file(fpath)
290             exec(preparse_file(open(fpath).read()) + "\n", globals)
291     elif ext == '.spyx' or ext == '.pyx':
292         if attach:

TypeError: expected string without null bytes"

Earlier on I was trying the same thing and getting the message: "IOError('did not find file %r to load or attach'"

I wonder if someone could tell me what I am doing wrong or might try to fix the problem?

click to hide/show revision 2
None

Error Loading file in sage

I am trying to use Sage on a mac and am not particularly computer savvy (e.g. I still haven't figured out what I am meant to do with PATH and find the installation documentation a bit forbidding). I am running sage from the command line from a particular folder which contains a file "test.sage" but when I put 'load("test.sage")' I get the following error message:

TypeError                                 Traceback (most recent call last)
<ipython-input-2-d772665a10d5> in <module>()
----> 1 load("test.sage")

load("test.sage") /Applications/SageMath/src/sage/structure/sage_object.pyx in sage.structure.sage_object.load (/Applications/SageMath/src/build/cythonized/sage/structure/sage_object.c:11186)()

(/Applications/SageMath/src/build/cythonized/sage/structure/sage_object.c:11186)()

    990 
 991     if sage.repl.load.is_loadable_filename(filename):
 992         sage.repl.load.load(filename, globals())
 993         return
994

994 /Applications/SageMath/local/lib/python2.7/site-packages/sage/repl/load.pyc in load(filename, globals, attach)

attach)

    288             if attach:
 289                 add_attached_file(fpath)
 290             exec(preparse_file(open(fpath).read()) + "\n", globals)
 291     elif ext == '.spyx' or ext == '.pyx':
 292         if attach:

TypeError: expected string without null bytes"

bytes" Earlier on I was trying the same thing and getting the message: "IOError('did not find file %r to load or attach'"

attach'"

I wonder if someone could tell me what I am doing wrong or might try to fix the problem?