Ask Your Question

ianjmatthews's profile - activity

2017-11-08 20:51:49 +0200 received badge  Notable Question (source)
2017-11-08 20:51:49 +0200 received badge  Popular Question (source)
2015-05-10 17:50:47 +0200 answered a question Running .sagetex.sage fails to return the 'out' file

Now tried running the ...sagetex.sage files from two different locations, and two different documents.

On both, I cd via the terminal to ensure I'm in the directory / subdirectory containing the sagetex.sage files . I then try both approaches: Firstly running the sagetex.sage file from within the main sage-6.6 directory (using ./<name>.sagetex.sage) and then try again running from outside the sage-6.6 directory and the same ./ ... approach. I do not get the same error as before, but this time it gives me a syntax error on line 4 of the ...sagtex.sage files. Checking the syntax (the line checks that the versions match) I can see no obvious error - I'm assuming that the syntax is based on python syntax.

The other approach I've tried is to run the files from the interactive sage using the 'load' command. This also gives the original 'file not found' error. However, I think the python version is iPython, but I'm not clear whether this makes any difference.

The comment 'sage being finicky' is well made, I guess much of linux / ubuntu tends to involve a fair degree of trial and error. I'll keep trying and any other ideas are welcomed and if I get a result I'll obviously post it

2015-05-09 00:49:21 +0200 asked a question Running .sagetex.sage fails to return the 'out' file

Have compiled Latex on the doc st_example. Returns the expected result, including the file st_example.sagetex.sage I then run this file via the terminal using the command $ sage (path to ).st_example.sagetex.sage This seems to be OK until it gets to the last line of the file when the following errors are shown

Traceback (most recent call last):
  File "/home/ian/disks/Tex_docs/Alltrials/alltests/st_example.sagetex.sage.py", line 29, in <module>
    _st_.endofdoc()
  File "/home/ian/sage-6.6/local/lib/python2.7/site-packages/sagetex.py", line 282, in endofdoc
    sagef = open(self.filename + '.sagetex.sage', 'r')
IOError: [Errno 2] No such file or directory: 'st_example.sagetex.sage'

The problem seems to be in the .py file where the path to st_example is not picked up and hence the 'out' file is not produced. I'm running Python 2.7 and the install of sage is recent ie one day ago. Everything else is working perfectly. is the generated .py file still expecting python 2.6 (as in the documentation) or is the final line of the python code incorrect?