Personal tools
You are here: Home Documentation Plone Snippets Interactive debugging with Python and Zope

Interactive debugging with Python and Zope

I wanted to collect in one place some very useful links providing information about enhanced debugging of Zope/Plone.

Sites



Example from a debug session to check Unauthorized exception:

>>> syd = app.acl_users.getUser('syd')
>>> from AccessControl.SecurityManagement import newSecurityManager
>>> newSecurityManager(None,syd)
>>> from Testing import makerequest
>>> app = makerequest.makerequest(app)
>>> app.parecom.wiki.ParITWiki.view()
...
  File "/opt/zope/Zope-2.8.7-final/lib/python/AccessControl/ImplPython.py", line 808, in raiseVerbose

    raise Unauthorized(text)
AccessControl.unauthorized.Unauthorized: The owner of the executing
script does not have the required permission.  Access to 'offspring' of
(ZWikiPage 'ParITWiki' at 0x2a9f0a11d0) denied. Access requires one of
the following roles: ['Manager', 'Member', 'Reviewer']. The executing
script is (FSDTMLMethod at /parecom/subtopics_outline used for
/parecom/wiki/ParITWiki), owned by Anonymous User, who has the roles
['Anonymous'].
>>>

Document Actions