Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Using sagemath on windows 10 : impossible to attach file

Hi! I've installed sagemath on windows 10 and I'm going crazy. The problem it seems to be that all the program is runing in some kind of temporal directory . I leave here some feedback from my console:

sage: load_attach_path()

['.']

If I change the path,

sage: load_attach_path('C:\Users\Javier\Desktop\current\height1')

sage: load_attach_path()

['.', 'C:\Users\Javier\Desktop\current\height1']

So we can confirm the new path was added. Inside the folder height1 I have a file "'heigth1.sage". Let's try to attach it:

sage: attach("height1.sage")

OSError Traceback (most recent call last) <ipython-input-4-cb4dd36405f2> in <module>() ----> 1 sage.repl.load.load(sage.repl.load.base64.b64decode("aGVpZ2h0MS5zYWdl"),globals(),True)

/opt/sagemath-8.2/local/lib/python2.7/site-packages/sage/repl/load.py in load(filename, globals, attach) 252 # See Trac 11812. 253 if attach: --> 254 add_attached_file(fpath) 255 with open(preparse_file_named(fpath)) as f: 256 code = compile(f.read(), preparse_file_named(fpath), 'exec')

/opt/sagemath-8.2/local/lib/python2.7/site-packages/sage/repl/attach.py in add_attached_file(filename) 376 sage.repl.inputhook.install() 377 fpath = os.path.abspath(filename) --> 378 attached[fpath] = os.path.getmtime(fpath) 379 380

/opt/sagemath-8.2/local/lib/python2.7/genericpath.py in getmtime(filename) 60 def getmtime(filename): 61 """Return the last modification time of a file, reported by os.stat().""" ---> 62 return os.stat(filename).st_mtime 63 64

OSError: [Errno 2] No such file or directory: '/home/Javier/C:\Users\Javier\Desktop\current\height1/height1.sage'


Recall the Error No such file or directory: '/home/Javier/C:\Users\Javier\Desktop\current\height1/height1.sage'. What ?? Please, help me ! I will appreciate your feedback very much!

Using sagemath on windows 10 : impossible to attach file

Hi! I've installed sagemath on windows 10 and I'm going crazy. The problem it seems to be that all the program is runing in some kind of temporal directory . I leave here some feedback from my console:

sage: load_attach_path()

['.']

load_attach_path() ['.']

If I change the path,

sage: load_attach_path('C:\Users\Javier\Desktop\current\height1')

load_attach_path('C:\Users\Javier\Desktop\current\height1') sage: load_attach_path()

load_attach_path() ['.', 'C:\Users\Javier\Desktop\current\height1']

'C:\\Users\\Javier\\Desktop\\current\\height1']

So we can confirm the new path was added. Inside the folder height1 I have a file "'heigth1.sage". Let's try to attach it:

sage: attach("height1.sage")

attach("height1.sage") --------------------------------------------------------------------------- OSError Traceback (most recent call last) <ipython-input-4-cb4dd36405f2> in <module>() ----> 1 sage.repl.load.load(sage.repl.load.base64.b64decode("aGVpZ2h0MS5zYWdl"),globals(),True)

sage.repl.load.load(sage.repl.load.base64.b64decode("aGVpZ2h0MS5zYWdl"),globals(),True) /opt/sagemath-8.2/local/lib/python2.7/site-packages/sage/repl/load.py in load(filename, globals, attach) 252 # See Trac 11812. 253 if attach: --> 254 add_attached_file(fpath) 255 with open(preparse_file_named(fpath)) as f: 256 code = compile(f.read(), preparse_file_named(fpath), 'exec')

'exec') /opt/sagemath-8.2/local/lib/python2.7/site-packages/sage/repl/attach.py in add_attached_file(filename) 376 sage.repl.inputhook.install() 377 fpath = os.path.abspath(filename) --> 378 attached[fpath] = os.path.getmtime(fpath) 379 380

380 /opt/sagemath-8.2/local/lib/python2.7/genericpath.py in getmtime(filename) 60 def getmtime(filename): 61 """Return the last modification time of a file, reported by os.stat().""" ---> 62 return os.stat(filename).st_mtime 63 64

64 OSError: [Errno 2] No such file or directory: '/home/Javier/C:\Users\Javier\Desktop\current\height1/height1.sage'

'/home/Javier/C:\\Users\\Javier\\Desktop\\current\\height1/height1.sage'

Recall the Error No such file or directory: '/home/Javier/C:\Users\Javier\Desktop\current\height1/height1.sage'. What ?? Please, help me ! I will appreciate your feedback very much!