Opened 10 years ago

Last modified 7 years ago

#13535 closed defect

Fix instrospection/... in live documentation with the flask notebook — at Version 4

Reported by: nthiery Owned by: jason, mpatel, was
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: notebook Keywords: agregation, bobo2012
Cc: Merged in:
Authors: Nicolas M. Thiéry Reviewers:
Report Upstream: Workaround found; Bug reported upstream. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by nthiery)

How to reproduce on Sage 5.3 main on Unbuntu 11.10. Run:

   sage -notebook

Go to any help page, and type in

   o = 3
   o.<tab>

Nothing happens and the following traceback appears in the terminal where sage-notebook was launched:

	Traceback (most recent call last):
	  File "/opt/sage-5.3/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/python/threadpool.py", line 190, in _worker
	    o = self.q.get()
	  File "/opt/sage-5.3/local/lib/python2.7/site-packages/Twisted-12.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 "/opt/sage-5.3/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 83, in callWithContext
	    self.contexts.pop()
	  File "/opt/sage-5.3/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/web/wsgi.py", line 340, in run
	    self.started = True
	--- <exception caught here> ---
	  File "/opt/sage-5.3/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/web/wsgi.py", line 315, in run
	    appIterator = self.application(self.environ, self.startResponse)
	  File "/opt/sage-5.3/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py", line 1701, in __call__
	    return self.wsgi_app(environ, start_response)
	  File "/opt/sage-5.3/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py", line 1689, in wsgi_app
	    response = self.make_response(self.handle_exception(e))
	  File "/opt/sage-5.3/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py", line 1687, in wsgi_app
	    response = self.full_dispatch_request()
	  File "/opt/sage-5.3/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py", line 1360, in full_dispatch_request
	    rv = self.handle_user_exception(e)
	  File "/opt/sage-5.3/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py", line 1358, in full_dispatch_request
	    rv = self.dispatch_request()
	  File "/opt/sage-5.3/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py", line 1344, in dispatch_request
	    return self.view_functions[rule.endpoint](**req.view_args)
	  File "/opt/sage-5.3/devel/sagenb/flask_version/decorators.py", line 27, in wrapper
	    return f(*args, **kwds)
	  File "/opt/sage-5.3/devel/sagenb/flask_version/worksheet.py", line 45, in wrapper
	    return f(username, id, **kwds)
	  File "/opt/sage-5.3/devel/sagenb/flask_version/worksheet.py", line 115, in wrapper
	    raise NotImplementedError("User _sage_ can not access URL %s"%target)
	exceptions.NotImplementedError: User _sage_ can not access URL introspect

There is no such failure in 5.1.

The attached patch fixes the white list to enable some missing notebook actions and features in the live documentation:

  • Introspection
  • Delete all output
  • Copy worksheet
  • New cell after
  • Restart Sage

There certainly are more of them that should be added. I let a notebook expert complete the list.

Change History (5)

comment:1 Changed 10 years ago by nthiery

In case this would be related, I just got the following message "exceptions.NotImplementedError?: User _sage_ can not access URL copy" while trying to make a copy of such a dynamic help page.

comment:2 Changed 10 years ago by nthiery

  • Keywords agregation added

comment:3 Changed 10 years ago by nthiery

  • Authors set to Nicolas M. Thiéry
  • Keywords bobo2012 added
  • Status changed from new to needs_review
  • Summary changed from Tab completion failing on dynamic help pages on 5.3 to Fix instrospection/... in live documentation with the flask notebook

comment:4 Changed 10 years ago by nthiery

  • Description modified (diff)
Note: See TracTickets for help on using tickets.