Ask Your Question

corleymj's profile - activity

2018-04-19 04:51:10 -0600 received badge  Popular Question (source)
2014-02-13 10:01:33 -0600 marked best answer Error in mathjax_sage.js. What's wrong with my configuration?

This bug is fixed in sage-6.1.1. Please upgrade.

2014-02-10 12:19:40 -0600 asked a question Error in mathjax_sage.js. What's wrong with my configuration?

I have installed Sage 6.1 on a brand new laptop running Ubuntu 12.04 LTS. When I fired up Sage and tried opening a worksheet in the notebook (Chrome/Firefox), the inline latex equations did not compile (they just appear as $...$) and the display equations appeared correctly, but in the color green. In the JS console I get the error:

Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://localhost:8080/javascript/dynamic/mathjax_sage.js

And here's the stack trace in Terminal:

Executing twistd  --pidfile="sage_notebook.sagenb/sagenb.pid" -ny "sage_notebook.sagenb/twistedconf.tac"
/home/corleymj/Programs/sage-6.1-x86_64-Linux/local/lib/python2.7/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec.  You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.
  _warn("Not using mpz_powm_sec.  You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)
2014-02-10 19:07:46-0500 [-] Log opened.
2014-02-10 19:07:46-0500 [-] twistd 13.1.0 (/home/corleymj/Programs/sage-6.1-x86_64-Linux/local/bin/python 2.7.5) starting up.
2014-02-10 19:07:46-0500 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2014-02-10 19:07:46-0500 [-] QuietSite starting on 8080
2014-02-10 19:07:46-0500 [-] Starting factory <__builtin__.QuietSite instance at 0x5ba97a0>
2014-02-10 19:07:50-0500 [-] WSGI application error
    Traceback (most recent call last):
      File "/home/corleymj/Programs/sage-6.1-x86_64-Linux/local/lib/python2.7/site-packages/Twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/python/threadpool.py", line 212, in _worker
        o = self.q.get()
      File "/home/corleymj/Programs/sage-6.1-x86_64-Linux/local/lib/python2.7/site-packages/Twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 118, in callWithContext
        return self.currentContext().callWithContext(ctx, func, *args, **kw)
      File "/home/corleymj/Programs/sage-6.1-x86_64-Linux/local/lib/python2.7/site-packages/Twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 83, in callWithContext
        self.contexts.pop()
      File "/home/corleymj/Programs/sage-6.1-x86_64-Linux/local/lib/python2.7/site-packages/Twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/web/wsgi.py", line 340, in run
        self.started = True
    --- <exception caught here> ---
      File "/home/corleymj/Programs/sage-6.1-x86_64-Linux/local/lib/python2.7/site-packages/Twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/web/wsgi.py", line 315, in run
        appIterator = self.application(self.environ, self.startResponse)
      File "/home/corleymj/Programs/sage-6.1-x86_64-Linux/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1836, in __call__
        return self.wsgi_app(environ, start_response)
      File "/home/corleymj/Programs/sage-6.1-x86_64-Linux/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1820, in wsgi_app
        response = self.make_response(self.handle_exception(e))
      File "/home/corleymj/Programs/sage-6.1-x86_64-Linux/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1403, in handle_exception
        reraise(exc_type, exc_value, tb)
      File "/home/corleymj/Programs/sage-6.1-x86_64-Linux/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1817, in wsgi_app
        response = self.full_dispatch_request()
      File "/home/corleymj/Programs/sage-6.1-x86_64-Linux/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1477, in full_dispatch_request
        rv = self ...
(more)
2014-01-15 15:17:12 -0600 received badge  Student (source)
2014-01-13 20:08:52 -0600 received badge  Editor (source)
2014-01-13 19:50:22 -0600 received badge  Scholar (source)
2014-01-13 19:50:22 -0600 marked best answer How to delete output file for rewriting?

If you can give a very simple example that would be helpful. I'm not sure why your program wouldn't simply overwrite them, but I am not familiar with the wave library. It should certainly be possible in the notebook itself. But here is the generic answer for the Terminal, since that doesn't seem to be working:

First, a sample in the Terminal:

$ ls .sage/sage_notebook.sagenb/home/admin/215/cells/13/
sage0-size500-1046860989.jmol.zip   sage0-size500.jmol
$ rm ./sage/sage_notebook.sagenb/home/admin/215/cells/13/sage0-size500.jmol
$

Steps:

  • Find the number of the worksheet you are looking at. This should be in the URL for the worksheet.
  • Find the correct folder for the worksheet. That should be, normally, in a URL of the form above like .sage/sage_notebook.sagenb/home/admin/# but it could change based on the DOT_SAGE environment variable and whether you are the default user. Permissions could conceivably be an issue in that case.
  • Look at the files in that worksheet's cells. See the example. You can see what cell the file lives in by using the "Edit" button, I think - there should be a tag there.
  • Remove the file in question.
2014-01-13 19:50:16 -0600 received badge  Supporter (source)
2014-01-12 16:52:09 -0600 asked a question How to delete output file for rewriting?

I am using the Python's wave library to create some simple .wav files. It is impossible to overwrite these files, so I need a way to delete them before I run the code to create them. Right now, I am having to rename the file every time. There must be a simple way to delete the files in Terminal but I can't seem to find them. I am creating the files via the Notebook GUI. Any clues where the files could be saved or know of any other way to delete them?