ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 16 Oct 2020 02:02:55 +0200newby has trouble with "load" in cloud.sagemath.comhttps://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/I get a syntax error when trying the command
load "example.sage"
in a workspace in cloud.sagemath.com:
Error in lines 1-1
Traceback (most recent call last):
File "/mnt/home/VCQT9SWb/.sagemathcloud/sage_server.py", line 412, in execute
exec compile(block, '', 'single') in namespace, locals
File "<string>", line 1
load "example.sage"
^
SyntaxError: invalid syntax
Wed, 29 May 2013 23:06:48 +0200https://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/Answer by William Stein for <p>I get a syntax error when trying the command</p>
<p>load "example.sage"</p>
<p>in a workspace in <a href="http://cloud.sagemath.com">cloud.sagemath.com</a>:</p>
<pre><code>Error in lines 1-1
Traceback (most recent call last):
File "/mnt/home/VCQT9SWb/.sagemathcloud/sage_server.py", line 412, in execute
exec compile(block, '', 'single') in namespace, locals
File "<string>", line 1
load "example.sage"
^
SyntaxError: invalid syntax
</code></pre>
https://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/?answer=14999#post-id-14999It's best to use load('example.sage'), which is just a normal Python function call, but will do what you want. These "% magics" have got a bit out of hand, at least in cases when they are not needed. Mon, 03 Jun 2013 00:15:16 +0200https://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/?answer=14999#post-id-14999Answer by Vijay for <p>I get a syntax error when trying the command</p>
<p>load "example.sage"</p>
<p>in a workspace in <a href="http://cloud.sagemath.com">cloud.sagemath.com</a>:</p>
<pre><code>Error in lines 1-1
Traceback (most recent call last):
File "/mnt/home/VCQT9SWb/.sagemathcloud/sage_server.py", line 412, in execute
exec compile(block, '', 'single') in namespace, locals
File "<string>", line 1
load "example.sage"
^
SyntaxError: invalid syntax
</code></pre>
https://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/?answer=15466#post-id-15466William,
Problem is resolved. Please ignore my last question.
Thank you
VijayWed, 18 Sep 2013 07:56:26 +0200https://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/?answer=15466#post-id-15466Answer by Vijay for <p>I get a syntax error when trying the command</p>
<p>load "example.sage"</p>
<p>in a workspace in <a href="http://cloud.sagemath.com">cloud.sagemath.com</a>:</p>
<pre><code>Error in lines 1-1
Traceback (most recent call last):
File "/mnt/home/VCQT9SWb/.sagemathcloud/sage_server.py", line 412, in execute
exec compile(block, '', 'single') in namespace, locals
File "<string>", line 1
load "example.sage"
^
SyntaxError: invalid syntax
</code></pre>
https://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/?answer=15468#post-id-15468William,
I used load command and in my .SAGE file I have another load for *.pyx file.
I am observing following while running .SAGE script:
load('hopf_animate.sage')
Compiling ./fib_param.pyx...
It is taking lot of time, so am I missing something here.
Thanks & Regards,
VijayWed, 18 Sep 2013 07:21:04 +0200https://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/?answer=15468#post-id-15468Answer by vdelecroix for <p>I get a syntax error when trying the command</p>
<p>load "example.sage"</p>
<p>in a workspace in <a href="http://cloud.sagemath.com">cloud.sagemath.com</a>:</p>
<pre><code>Error in lines 1-1
Traceback (most recent call last):
File "/mnt/home/VCQT9SWb/.sagemathcloud/sage_server.py", line 412, in execute
exec compile(block, '', 'single') in namespace, locals
File "<string>", line 1
load "example.sage"
^
SyntaxError: invalid syntax
</code></pre>
https://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/?answer=14987#post-id-14987Hi,
Even with a standard Sage installation, the command load "example.sage" will not work. Use
%runfile example.sage
instead (but I do not know whether it would work on the cloud).Thu, 30 May 2013 03:38:07 +0200https://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/?answer=14987#post-id-14987Comment by Daniel R. Grayson for <p>Hi,</p>
<p>Even with a standard Sage installation, the command load "example.sage" will not work. Use</p>
<pre><code>%runfile example.sage
</code></pre>
<p>instead (but I do not know whether it would work on the cloud).</p>
https://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/?comment=17615#post-id-17615Yes, with standard sage, "load" provokes a message "DeprecationWarning: Use %runfile instead of load", but loads it anyway. But in a "worksheet", "%runfile" doesn't work, either, resulting in "NameError: name 'runfile' is not defined"Thu, 30 May 2013 08:09:28 +0200https://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/?comment=17615#post-id-17615Comment by cybervigilante for <p>Hi,</p>
<p>Even with a standard Sage installation, the command load "example.sage" will not work. Use</p>
<pre><code>%runfile example.sage
</code></pre>
<p>instead (but I do not know whether it would work on the cloud).</p>
https://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/?comment=53937#post-id-53937Still won't work. Sage saves as a .sobj file but on load says .sobj files are not recognized. Should be a simple save, load but they're making it awful hard.Fri, 16 Oct 2020 02:02:55 +0200https://ask.sagemath.org/question/10166/newby-has-trouble-with-load-in-cloudsagemathcom/?comment=53937#post-id-53937