ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 03 Dec 2016 07:53:47 -0600Error Loading file in sagehttp://ask.sagemath.org/question/35059/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?Tue, 04 Oct 2016 11:28:46 -0500http://ask.sagemath.org/question/35059/error-loading-file-in-sage/Comment by slelievre for <p>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:</p>
<pre><code>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'"
</code></pre>
<p>I wonder if someone could tell me what I am doing wrong or might try to fix the problem?</p>
http://ask.sagemath.org/question/35059/error-loading-file-in-sage/?comment=35895#post-id-35895@sansboarders --
How did you install Sage?Sat, 03 Dec 2016 07:53:47 -0600http://ask.sagemath.org/question/35059/error-loading-file-in-sage/?comment=35895#post-id-35895Comment by kcrisman for <p>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:</p>
<pre><code>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'"
</code></pre>
<p>I wonder if someone could tell me what I am doing wrong or might try to fix the problem?</p>
http://ask.sagemath.org/question/35059/error-loading-file-in-sage/?comment=35061#post-id-35061See also http://stackoverflow.com/questions/39857327/error-loading-file-in-sageTue, 04 Oct 2016 11:42:50 -0500http://ask.sagemath.org/question/35059/error-loading-file-in-sage/?comment=35061#post-id-35061