#6820: [with patch, needs review] browse sage docs
---------------------------+------------------------------------------------
 Reporter:  jhpalmieri     |       Owner:  tba          
     Type:  enhancement    |      Status:  new          
 Priority:  minor          |   Milestone:  sage-4.1.2   
Component:  documentation  |    Keywords:               
 Reviewer:                 |      Author:  John Palmieri
   Merged:                 |  
---------------------------+------------------------------------------------

Comment(by mpatel):

 Sphinx 0.5.1 throws a strange exception in `Cell.set_introspect_html()`.
 I set `verbose=True` and replaced `sphinx_app.build(None, [rst_name])`
 with
 {{{
                 try:
                     sphinx_app.build(None, [rst_name])
                 except Exception as exc:
                     print exc
 }}}
 Following `sage -br`:
 {{{
 sage: browse_sage_doc(identity_matrix)
 Introspection cache:  /home/.sage/sage_notebook/doc
 Sphinx v0.5.1, building html
 building [html]: 1 source files given on command line
 updating environment: 1 added, 0 changed, 0 removed
 reading sources... 72cbd366010a4030c528d1f807be048b
 pickling environment... done
 checking consistency... done
 preparing documents... done
 writing output... 72cbd366010a4030c528d1f807be048b [Errno 2] No such file
 or directory: '../../../sage/local/lib/python2.6/site-
 packages/docutils/writers/html4css1/html4css1.css'
 Built: /home/.sage/sage_notebook/doc/72cbd366010a4030c528d1f807be048b.html
 ---------------------------------------------------------------------------
 IOError                                   Traceback (most recent call
 last)

 /home/.sage/temp/chopin/25868/_home__sage_init_sage_0.py in <module>()

 /home/apps/sage/local/lib/python2.6/site-packages/sage/misc/sagedoc.pyc in
 __call__(self, obj, output, view)
     842             from sage.server.notebook.cell import Cell
     843             cell = Cell(0, '0', '0', None)
 --> 844             cell.set_introspect_html(s)
     845             html = cell._Cell__introspect_html
     846             if view:

 /home/apps/sage/local/lib/python2.6/site-
 packages/sage/server/notebook/cell.pyc in set_introspect_html(self, html,
 completing, verbose)
    1590             finally:
    1591                 # Contents should be flushed on close().
 -> 1592                 fd_html = open(html_name, 'r')
    1593                 new_html = fd_html.read()
    1594                 fd_html.close()

 IOError: [Errno 2] No such file or directory:
 '/home/.sage/sage_notebook/doc/72cbd366010a4030c528d1f807be048b.html'
 sage:
 }}}
 The lock file remains in the doc cache directory.  This may be peculiar to
 my current setup, but I can't investigate further right now.

 Also, by default `set_introspect_html()` tries to delete the reST file.

 Should we delete leftover .lock files on startup?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6820#comment:2>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to