Workbooks not shown after 4.8 upgrade

15 views
Skip to first unread message

Matthew Miller

unread,
Feb 11, 2012, 2:59:58 PM2/11/12
to sage-support
Hi,

I built sage 4.8 from sources and after starting the notebook
interface, and logging in, none of my previous workbooks are shown. I
exited sage and started the notebook server in the 4.7.2 version and
got the same result: no workbooks.

I notice now that after running notebook() that this output is shown
in both 4.7.2 and 4.8:
The notebook files are stored in: .sagenb

I checked my hard drive backups from when only 4.7.2 was installed and
there is no .sagenb directory, just the .sage directory. I copied
my .sage from backups to both ~/.sage and ~/.sagenb, then rebuilt
4.7.2 from source. I hoped to save each workbook to a .sws file and
import these to 4.8, but still no workbooks.

Where is this configuration for specifying the .sagenb folder kept?
This seems to have been introduced in 4.8 as the directory wasn't
present in my backups, and I though a clean build of the 4.7.2 would
remove mention of it and get my workbooks back.

I would be grateful for any help in getting this fixed. I am out of
ideas at this point.

Matthew

Jason Grout

unread,
Feb 11, 2012, 3:09:36 PM2/11/12
to sage-s...@googlegroups.com
On 2/11/12 1:59 PM, Matthew Miller wrote:
> Where is this configuration for specifying the .sagenb folder kept?
> This seems to have been introduced in 4.8 as the directory wasn't
> present in my backups, and I though a clean build of the 4.7.2 would
> remove mention of it and get my workbooks back.

I'm not sure what is going on there (I haven't been working on the
version of sagenb that comes with 4.8). However, the default place for
worksheets is:

~/.sage/sage_notebook.sagenb/

and I don't think that should have changed between 4.7.2 and 4.8.

You can specify the directory explicitly by using the directory parameter:

notebook(directory='~/.sage/sage_notebook.sagenb')

Thanks,

Jason

Matthew Miller

unread,
Feb 11, 2012, 3:19:29 PM2/11/12
to sage-support
Hi Jason,

On Feb 11, 3:09 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
>
> and I don't think that should have changed between 4.7.2 and 4.8.
>
> You can specify the directory explicitly by using the directory parameter:
>
> notebook(directory='~/.sage/sage_notebook.sagenb')

Your suggestion fixed the problem, but with a modification. I had to
replace ~ with the actual path. I'm not sure why it wasn't expanded...

I'm running a Slackware 13.0 install and the previously 4.7.2 was
running on Slack 12.0. There is where the difference must be.

Thank you for your help. I'm glad to have all my workbooks back
now. :) Many thanks!!

Keshav Kini

unread,
Feb 11, 2012, 4:04:59 PM2/11/12
to sage-s...@googlegroups.com
~ is a shorthand which is expanded by the shell, the same way $HOME (an environment variable). It is not a valid path. Since you are passing the path '~/.sage/sage_notebook.sagenb' directly to a Python function, the shell is not involved at all, so no expansion occurs.

By the way, they are called worksheets, and the interface is called the notebook :)

-Keshav

----
Join us in #sagemath on irc.freenode.net !
Reply all
Reply to author
Forward
0 new messages