Ask Your Question
1

How do I use Sloane's Encyclopedia on Sage Math Cloud?

asked 2014-06-29 08:35:06 -0500

Peter Luschny gravatar image

updated 2014-07-01 01:59:00 -0500

Calling SloaneEncyclopedia.install() (in a IPython notebook) gives the IOError "Connection refused".

Update: The error has changed. It is now

/usr/local/sage/sage-6.2.rc2/local/lib/python/os.pyc in makedirs(name, mode)
    155         if tail == curdir:           # xxx/newdir/. exists if xxx/newdir exists
    156             return
--> 157     mkdir(name, mode)
    158 
    159 def removedirs(name):

OSError: [Errno 13] Permission denied: '/usr/local/sage/sage-6.2.rc2/local/share/sloane'

edit retag flag offensive close merge delete

Comments

Projects by default now have a firewall that blocks most outgoing connections. Exactly what ip addresses does `SloaneEncyclopedia.install()` use? Maybe I could unblock it...

William Stein gravatar imageWilliam Stein ( 2014-06-29 10:09:58 -0500 )edit

FWIW, works fine in a local Sage Version 6.3.beta4.

rws gravatar imagerws ( 2014-07-01 04:08:22 -0500 )edit

rws, for a local Sage it works also for older versions. The issue is (perhaps was, William changed something, I have not yet tested it) in the Cloud.

Peter Luschny gravatar imagePeter Luschny ( 2014-07-03 14:16:54 -0500 )edit

@William Stein: Apparently oeis.org uses the ip 67.23.6.156, you could unblock that. Thanks!

slelievre gravatar imageslelievre ( 2014-07-15 17:04:18 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-30 17:57:37 -0500

Peter Luschny gravatar image

In the file sage/databases/sloane.py replace in the code

def install(self, oeis_url="http://oeis.org/classic/stripped.gz", names_url="http://oeis.org/classic/names.gz", overwrite=False):

by

def install(self, oeis_url="http://oeis.org/stripped.gz", names_url="http://oeis.org/names.gz", overwrite=False):

In the documentation of the install function replace

- ``oeis_url`` - string (default: "http://www.research.att.com...")

by

 - ``oeis_url`` - string (default: "http://oeis.org...")

and replace

- ``names_url`` - string (default: "http://www.research.att.com...")

by

- ``names_url`` - string (default: "http://oeis.org...")

Reference: http://oeis.org/wiki/QandA_For_New_OE...

edit flag offensive delete link more

Comments

This refers to https://github.com/sagemath/sagelib/blob/master/sage/databases/sloane.py By chance the next time I googled I got https://github.com/sagemath/sage/blob/064df9f25ec6d075add84200748ad9e770d0af21/src/sage/databases/sloane.py Here the definition of the install function is correct but not the documentation.

Peter Luschny gravatar imagePeter Luschny ( 2014-07-01 05:00:39 -0500 )edit

Thanks for pointing this out -- it is now tracked at http://trac.sagemath.org/ticket/10358

niles gravatar imageniles ( 2014-07-01 07:06:29 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-06-29 08:35:06 -0500

Seen: 342 times

Last updated: Jul 01 '14