Hello Jason,
thanks for your reply,
Now I am able to run the Wiki example using sagecell with the following syntax:
$sageReply1 = AskSage($SageCode1 , {accepted_tos=>true});
which uses the default sagecell server at sagemath.org
However if I want to specify the url of the sagecell server
$sageReply2 = AskSage($SageCode2 , {url=>'http://sagecell.sagemath.org',accepted_tos=>true});
I got an error
Unable to make a sage call to http://sagecell.sagemath
Looking at the source code, I found that the url of the sagecell server must be written as:
$sageReply2 = AskSage($SageCode2 , {url=>'https://sagecell.sagemath.org/service',accepted_tos=>true});
However I want to use my own sagecell server for efficiency reason. The sage server is running as a non-root user using the port 8080:
Accessing my sageserver using
http//sagecellmeca.univ-lyon1.fr:8080
works without problem inside a browser or in moodle, but with AskSage
$sageReply2 = AskSage($SageCode2 , {url=>'http://sagecellmeca.univ-lyon1.fr:8080',accepted_tos=>true});
I got the following error
ERROR in contacting sage server. Did you accept the terms of service by
setting {accepted_tos=>'true'} in the askSage options?
<html><title>405: Method Not Allowed</title><body>405: Method Not Allowed</body></html>
IO.pm: ERROR trapped during JSON call to sage:
Unable to make a sage call to http://sagecellmeca.univ-lyon1.fr:8080. at [PG]/lib/WeBWorK/PG/IO.pm line 310
using
http://sagecellmeca.univ-lyon1.fr/service:8080 does not work either.
Do I need a special configuration of the sagecell server in order to use AskSage inside Webwork ?
I have also try the macro Sage in PG/macro described here in the wiki
http://webwork.maa.org/wiki/Sage_in_WeBWorK
Using the macro in a WebWork problem
Sage(
SageCode=>$SageCode,
AutoEvaluateCell=>'true',
CellServer=>"http://sagecellmeca.univ-lyon1.fr:8080",
);
works, but the interaction with webwork is not so easy as AskSage
Thanks
Marc