Ask Your Question

sansboarders's profile - activity

2020-07-25 18:49:09 +0200 received badge  Famous Question (source)
2018-01-07 12:56:43 +0200 received badge  Notable Question (source)
2016-12-12 19:02:59 +0200 received badge  Popular Question (source)
2016-12-03 14:55:15 +0200 received badge  Student (source)
2016-10-04 18:42:33 +0200 asked a question 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)()

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

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