Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

loaded file not found

I am trying to load a python script into sage notebook, with commands load('file.py'), and attach('file.py').

But I am getting the error: IOError: did not find file

The file is there! I am using sage 8.6 on Windows 10

load('C:\Program Files (x86)\MyJournal\Images\functions.py')


IOError Traceback (most recent call last) <ipython-input-104-057b25088154> in <module>() ----> 1 load('C:\Program Files (x86)\MyJournal\Images\functions.py')

/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/misc/persist.pyx in sage.misc.persist.load (build/cythonized/sage/misc/persist.c:2470)() 134 135 if sage.repl.load.is_loadable_filename(filename): --> 136 sage.repl.load.load(filename, globals()) 137 return 138

/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/repl/load.py in load(filename, globals, attach) 233 break 234 else: --> 235 raise IOError('did not find file %r to load or attach' % filename) 236 237 ext = os.path.splitext(fpath)[1].lower()

IOError: did not find file 'C:\Program Files (x86)\MyJournal\Images\functions.py' to load or attach

loaded file not found

I am trying to load a python script into sage notebook, with commands load('file.py'), and attach('file.py').

But I am getting the error: IOError: did not find file

The file is there! I am using sage 8.6 on Windows 10

load('C:\Program Files (x86)\MyJournal\Images\functions.py')

UPDATE Sage loads the file from my home directory.

I seems that Sage just does not have access to Program Files directory.


IOError Traceback (most recent call last) <ipython-input-104-057b25088154> in <module>() ----> 1 load('C:\Program Files (x86)\MyJournal\Images\functions.py')

/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/misc/persist.pyx in sage.misc.persist.load (build/cythonized/sage/misc/persist.c:2470)() 134 135 if sage.repl.load.is_loadable_filename(filename): --> 136 sage.repl.load.load(filename, globals()) 137 return 138

/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/repl/load.py in load(filename, globals, attach) 233 break 234 else: --> 235 raise IOError('did not find file %r to load or attach' % filename) 236 237 ext = os.path.splitext(fpath)[1].lower()

IOError: did not find file 'C:\Program Files (x86)\MyJournal\Images\functions.py' to load or attach

loaded file not found

I am trying to load a python script into sage notebook, with commands load('file.py'), and attach('file.py').

But I am getting the error: IOError: did not find file

The file is there! I am using sage 8.6 on Windows 10

load('C:\Program 10.

sage: load('C:\\Program Files (x86)\MyJournal\Images\functions.py')

(x86)\\MyJournal\\Images\\functions.py')

UPDATE Sage loads the file from my home directory. directory.

I seems that Sage just does not have access to Program Files directory.


---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
<ipython-input-104-057b25088154> in <module>()
----> 1 load('C:\Program load('C:\\Program Files (x86)\MyJournal\Images\functions.py')

(x86)\\MyJournal\\Images\\functions.py') /opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/misc/persist.pyx in sage.misc.persist.load (build/cythonized/sage/misc/persist.c:2470)() 134 135 if sage.repl.load.is_loadable_filename(filename): --> 136 sage.repl.load.load(filename, globals()) 137 return 138

/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/repl/load.py in load(filename, globals, attach) 233 break 234 else: --> 235 raise IOError('did not find file %r to load or attach' % filename) 236 237 ext = os.path.splitext(fpath)[1].lower()

os.path.splitext(fpath)[1].lower() IOError: did not find file 'C:\Program 'C:\\Program Files (x86)\MyJournal\Images\functions.py' (x86)\\MyJournal\\Images\\functions.py' to load or attach

attach
click to hide/show revision 4
retagged

loaded file not found

I am trying to load a python script into sage notebook, with commands load('file.py'), and attach('file.py').

But I am getting the error: IOError: did not find file

The file is there! I am using sage 8.6 on Windows 10.

sage: load('C:\\Program Files (x86)\\MyJournal\\Images\\functions.py')

UPDATE Sage loads the file from my home directory.

I seems that Sage just does not have access to Program Files directory.

---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
<ipython-input-104-057b25088154> in <module>()
----> 1 load('C:\\Program Files (x86)\\MyJournal\\Images\\functions.py')

/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/misc/persist.pyx in sage.misc.persist.load (build/cythonized/sage/misc/persist.c:2470)()
    134 
    135     if sage.repl.load.is_loadable_filename(filename):
--> 136         sage.repl.load.load(filename, globals())
    137         return
    138 

/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/repl/load.py in load(filename, globals, attach)
    233             break
    234     else:
--> 235         raise IOError('did not find file %r to load or attach' % filename)
    236 
    237     ext = os.path.splitext(fpath)[1].lower()

IOError: did not find file 'C:\\Program Files (x86)\\MyJournal\\Images\\functions.py' to load or attach