Failing to add a script to sage

asked 2020-02-05 17:00:48 -0600

GMAR77 gravatar image

updated 2020-02-09 05:01:32 -0600

vdelecroix gravatar image

I have recently started using SageMath on MacOs (used to working in Magma) and my question has a high possibility of being dumb.. In any case, I am trying to run this code -- on github /catherineray/aut-jac and I am not able to even install it properly. Readme file specifies what I need (My magma has all the required specs etc) and, most likely, I am not able to set up SageTrac.

When I try to run autperio.sage it gives me this error

load('autperio.sage')
  File "<string>", line 41
    print Curve(f).genus()
              ^
SyntaxError: invalid syntax
edit retag flag offensive close merge delete

Comments

Don't use load but %runfile autoperio.sage

vdelecroix gravatar imagevdelecroix ( 2020-02-06 10:49:59 -0600 )edit

and print is a function in python3, so you should write "print(Curve(f).genus())" with parentheses.

FrédéricC gravatar imageFrédéricC ( 2020-02-06 13:43:29 -0600 )edit

Thank you for your comments:
1) When I try %runfile autoperio.sage (I am in the right directory etc) I get OSError: did not find file autoperio.sage to load or attach

2) I have also tried to change the print from Python3 and added (" "), still I get a different error TypeError: `Error evaluating Magma code. IN:_sage_[5]:=FindPolarizationBasis(_sage_[4]); OUT:

_sage_[5]:=FindPolarizationBasis(_sage_[4]); ^ User error: Identifier 'FindPolarizationBasis' has not been declared or assigned`

GMAR77 gravatar imageGMAR77 ( 2020-02-08 10:06:34 -0600 )edit

My biggest problem is this:

`RuntimeError: Error evaluating Magma code.

IN:_sage_[14], _sage_[15] := OrderData(_sage_[13]); OUT:

_sage_[14], _sage_[15] := OrderData(_sage_[13]); ^ User error: Identifier 'OrderData' has not been declared or assigned`

GMAR77 gravatar imageGMAR77 ( 2020-02-08 12:12:28 -0600 )edit
1

Looks like the authors forgot to list some dependencies. Here is one possibility: OrderData. Probably your question is better addressed to the authors.

rburing gravatar imagerburing ( 2020-02-09 11:51:47 -0600 )edit