1

I have a Sage notebook server that runs in a screen session on Ubuntu Server 14.04 (32-bit). When I'm ssh'd to the machine, I can use my notebook in my browser as expected. If I'm not ssh'd to the machine (but notebook server still running in screen session), I can still log in and open my notebook, but when I press SHIFT+ENTER in a compute cell, I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_3.py", line 8, in <module>
    _interact_.SAGE_CELL_ID=1
NameError: name '_interact_' is not defined

If I then go ssh back into the machine, I close and reopen the notebook (log out from the server is not necessary), and I can use compute cells normally again. I don't even have to be attached to the screen session, just logged in to the host.

I thought the most likely culprit would be related to the eCryptfs of my home dir, so I created /var/sage/sage_notebook.sagenb, but I still get the error*. Currently, the permissions are at 750, but I also tried 777 without success.

The issue is clearly something that's missing when I'm not logged in, but I can't figure out what. The server is a pretty vanilla, ext4 install. Does anyone know what I'm missing?

*Actually, I was getting permission denied errors when the notebook dir was in my home dir and I wasn't logged in. The error shown is what I'm seeing now that I've moved to /var/sage/...

1
  • Although the old sagenb is not being currently worked on much, you could ask this question on the Sage support Google group, ask.sagemath.org or even stackoverflow and possible get an answer. You certainly shouldn't have to create the directory in question, that should definitely be automatic. – kcrisman Mar 14 '17 at 19:11
0

Answer was provided on Unix SE.

I had moved the notebook dir out of my home dir, but Sage was still accessing its config in ~/.sage. Setting export HOME=/var/sage worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.