Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebook "load" or "attach" does not work #230

Closed
nbruin opened this issue Jan 29, 2007 · 2 comments
Closed

Notebook "load" or "attach" does not work #230

nbruin opened this issue Jan 29, 2007 · 2 comments

Comments

@nbruin
Copy link
Contributor

nbruin commented Jan 29, 2007

If in a notebook I use:

%sh
cat > hello.spyx << EOF
def hello(name):
    """
    Print hello with the given name.
    """
    print("Hello %s"%name)
EOF

and then

load "hello.spyx"

the notebook hangs. In the server log I get:

  ...
  File "/usr/local/sage/default/local/lib/python2.5/site-packages/sage/server/notebook/worksheet.py", line 957, in _load_file
    t = self.do_sage_extensions_preparsing(t,
UnboundLocalError: local variable 't' referenced before assignment

This is not due to the file not being found: If I try to load or attach a non-existent file, I get an appropriate error message.

Component: notebook

Issue created by migration from https://trac.sagemath.org/ticket/230

@williamstein
Copy link
Contributor

comment:1

Now, instead of an error, one gets a not implemented error. I've changed this from
defect to feature request.

Note the correct input should be:

%sh
cd
cat > hello.spyx << EOF
def hello(name):
    """
    Print hello with the given name.
    """
    print("Hello %s"%name)
EOF
load "hello.spyx"

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Aug 21, 2007

comment:2

I can reproduce the problem, but the error message has changed:

load "hello.spyx"
Error loading /tmp/Work2/sage-2.8.1/sage-2.8.1/hello.spyx -- file not
found

The spyx file can actually be found in $SAGE_ROOT/data/extcode/sage/hello.spyx

This bug also seems to be duplicate of #236.

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin modified the milestones: sage-3.0, sage-2.9 Aug 21, 2007
@sagetrac-mabshoff sagetrac-mabshoff mannequin modified the milestones: sage-2.9, sage-2.8.4 Sep 6, 2007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants