[Zope] Apidoc hangover

Luciano Ramalho luciano at ramalho.org
Thu Dec 27 17:05:15 EST 2007


Maybe apidoc had too much to drink over Christmas, but right now both
the apidoc tool at zope.org and the one in a freshly installed local
zopeproject are broken...  I guess I should be drinking myself.

ISSUE WITH PUBLIC APIDOC
-----------------------------------------------

The public one [1] gives me a "The page that you are trying to access
is not available" when I try to search for an interface.
[1] http://apidoc.zope.org/++apidoc++/

Steps to reproduce:

1) visit http://apidoc.zope.org/++apidoc++/
2) in the top left frame, click on the "Interfaces" link
3) in the lower left frame, write the name of an interface (or
anything, actually) in the search field and hit enter
4) the lower left frame is replaced with a standard Zope 3 error page
with the message "The page that you are trying to access is not
available"

ISSUE WITH LOCAL APIDOC
-----------------------------------------------

A local Zope 3.4 instance freshly installed with zopeproject 0.4.1
gives me a "A system error occurred." in the main (right) frame when I
try to browse the source code docs in several ways (but the Book
content is OK).

Steps to reproduce:

1) visit http://localhost:8080/++apidoc++
2) in the top left frame, click on the "Interfaces" link
3) in the lower left frame, write the name of an existing interface in
the search field and hit enter (for ex: IPrincipal)
4) click on any of the links displayed in the lower left frame as
results of the search
5) the right frame shows "A system error occurred." (see traceback at
the end of this message).

I did a little research on the error, and found this page [2], which
may contain an explanation.

[2] http://peak.telecommunity.com/DevCenter/PackageNotes

If you search that page for "not a directory" you'll find this:

PEAK-0.5a4dev_r2085
    peak test fails with an "IOError: [Errno 20] Not a directory"
because RuleDispatch-0.5a0dev_r2083, an egg on which PEAK depends,
installs as a zip, and the version of docutils included in PEAK isn't
zip module savvy. Unzipping the RuleDispatch egg works around the
problem.

Is this another symptom of the growing pains as Zope becomes eggified?

Cheers, and a great 2008 to all!

Luciano


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
luciano at stella:~/zope3/apidoc8099$ sudo easy_install -U zopeproject
Searching for zopeproject
Reading http://pypi.python.org/simple/zopeproject/
Best match: zopeproject 0.4.1
Processing zopeproject-0.4.1-py2.4.egg
zopeproject 0.4.1 is already the active version in easy-install.pth
Installing zopeproject script to /usr/local/bin

Using /usr/local/lib/python2.4/site-packages/zopeproject-0.4.1-py2.4.egg
Processing dependencies for zopeproject
Finished processing dependencies for zopeproject
luciano at stella:~/zope3/apidoc8099$ zopeproject apidoc8099
Enter user (Name of an initial administrator user): admin
Enter passwd (Password for the initial administrator user): admin
Enter eggs_dir (Location where zc.buildout will look for and place
packages) ['/home/luciano/buildout-eggs']:
Creating directory ./apidoc8099
Downloading zc.buildout...
Invoking zc.buildout...
luciano at stella:~/zope3/apidoc8099$ bin/apidoc8099-ctl fg
bin/paster serve deploy.ini
------
2007-12-27T19:49:01 WARNING root Developer mode is enabled: this is a
security risk and should NOT be enabled on production servers.
Developer mode can be turned off in etc/zope.conf
------
2007-12-27T19:49:04 WARNING ZODB.FileStorage Ignoring index for var/Data.fs
Starting server in PID 9546.
------
2007-12-27T19:49:04 INFO paste.httpserver.ThreadPool Cannot use
kill_thread_limit as ctypes/killthread is not available
serving on http://127.0.0.1:8080
------
2007-12-27T19:49:24 ERROR SiteError
http://localhost:8080/++apidoc++/Interface/zope.app.folder.interfaces.IFolder/index.html
Traceback (most recent call last):
  File "/home/luciano/buildout-eggs/tmptsBYNd/zope.publisher-3.5.0a1.dev_r78838-py2.4.egg/zope/publisher/publish.py",
line 133, in publish
  File "/home/luciano/buildout-eggs/tmpcOhTFg/zope.app.publication-3.4.2-py2.4.egg/zope/app/publication/zopepublication.py",
line 167, in callObject
  File "/home/luciano/buildout-eggs/tmptsBYNd/zope.publisher-3.5.0a1.dev_r78838-py2.4.egg/zope/publisher/publish.py",
line 108, in mapply
   - __traceback_info__: <security proxied
zope.app.pagetemplate.simpleviewclass.SimpleViewClass from
/home/luciano/buildout-eggs/zope.app.apidoc-3.4.0a1-py2.4.egg/zope/app/apidoc/ifacemodule/index.pt
instance at 0x2c2ba10>
  File "/home/luciano/buildout-eggs/tmptsBYNd/zope.publisher-3.5.0a1.dev_r78838-py2.4.egg/zope/publisher/publish.py",
line 114, in debug_call
  File "/home/luciano/buildout-eggs/zope.app.pagetemplate-3.4.0-py2.4.egg/zope/app/pagetemplate/simpleviewclass.py",
line 44, in __call__
    return self.index(*args, **kw)
  File "/home/luciano/buildout-eggs/zope.app.pagetemplate-3.4.0-py2.4.egg/zope/app/pagetemplate/viewpagetemplatefile.py",
line 83, in __call__
    return self.im_func(im_self, *args, **kw)
  File "/home/luciano/buildout-eggs/zope.app.pagetemplate-3.4.0-py2.4.egg/zope/app/pagetemplate/viewpagetemplatefile.py",
line 51, in __call__
    sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
  File "/home/luciano/buildout-eggs/tmpwaAfR_/zope.pagetemplate-3.4.0a1-py2.4.egg/zope/pagetemplate/pagetemplate.py",
line 115, in pt_render
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 271, in __call__
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 346, in interpret
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 891, in do_useMacro
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 346, in interpret
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 536, in do_optTag_tal
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 521, in do_optTag
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 516, in no_tag
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 346, in interpret
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 949, in do_defineSlot
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 346, in interpret
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 891, in do_useMacro
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 346, in interpret
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 536, in do_optTag_tal
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 521, in do_optTag
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 516, in no_tag
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 346, in interpret
  File "/home/luciano/buildout-eggs/tmpXUv3WC/zope.tal-3.4.0b1-py2.4.egg/zope/tal/talinterpreter.py",
line 822, in do_loop_tal
  File "/home/luciano/buildout-eggs/tmpP7zSnC/zope.tales-3.4.0a1-py2.4.egg/zope/tales/tales.py",
line 682, in setRepeat
  File "/home/luciano/buildout-eggs/tmpP7zSnC/zope.tales-3.4.0a1-py2.4.egg/zope/tales/tales.py",
line 696, in evaluate
   - /home/luciano/buildout-eggs/zope.app.apidoc-3.4.0a1-py2.4.egg/zope/app/apidoc/browser/details_macros.pt
   - Line 77, Column 4
   - Expression: <PathExpr standard:u'context/@@code_breadcrumbs'>
   - Names:
      {'args': (),
       'context': <InterfaceClass zope.app.folder.interfaces.IFolder>,
       'default': <object object at 0x2b1ac64ec250>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': {},
       'request': <zope.publisher.browser.BrowserRequest instance
URL=http://localhost:8080/++apidoc++/Interface/zope.app.folder.interfaces.IFolder/index.html>,
       'template':
<zope.app.pagetemplate.viewpagetemplatefile.ViewPageTemplateFile
object at 0x2406ed0>,
       'view': <zope.app.pagetemplate.simpleviewclass.SimpleViewClass
from /home/luciano/buildout-eggs/zope.app.apidoc-3.4.0a1-py2.4.egg/zope/app/apidoc/ifacemodule/index.pt
object at 0x2c2ba10>,
       'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper
object at 0x2c2b550>}
  File "/home/luciano/buildout-eggs/tmpP7zSnC/zope.tales-3.4.0a1-py2.4.egg/zope/tales/expressions.py",
line 217, in __call__
  File "/home/luciano/buildout-eggs/tmpP7zSnC/zope.tales-3.4.0a1-py2.4.egg/zope/tales/expressions.py",
line 211, in _eval
  File "/home/luciano/buildout-eggs/tmp8tH4Or/zope.app.apidoc-3.4.0a1-py2.4.egg/zope/app/apidoc/ifacemodule/browser.py",
line 303, in __call__
  File "/home/luciano/buildout-eggs/tmpPx3jhJ/zope.traversing-3.5.0a1.dev_r78730-py2.4.egg/zope/traversing/api.py",
line 87, in traverse
  File "/home/luciano/buildout-eggs/tmpPx3jhJ/zope.traversing-3.5.0a1.dev_r78730-py2.4.egg/zope/traversing/adapters.py",
line 113, in traverse
  File "/home/luciano/buildout-eggs/tmpPx3jhJ/zope.traversing-3.5.0a1.dev_r78730-py2.4.egg/zope/traversing/adapters.py",
line 164, in traversePathElement
   - __traceback_info__:
(<zope.app.apidoc.codemodule.codemodule.CodeModule object at
0x23891d0>, 'zope')
  File "/home/luciano/buildout-eggs/tmpBinDml/zope.app.container-3.5.0a1-py2.4-linux-x86_64.egg/zope/app/container/traversal.py",
line 96, in traverse
  File "/home/luciano/buildout-eggs/tmp8tH4Or/zope.app.apidoc-3.4.0a1-py2.4.egg/zope/app/apidoc/codemodule/codemodule.py",
line 95, in get
  File "/home/luciano/buildout-eggs/tmp8tH4Or/zope.app.apidoc-3.4.0a1-py2.4.egg/zope/app/apidoc/codemodule/codemodule.py",
line 74, in setup
  File "/home/luciano/buildout-eggs/tmp8tH4Or/zope.app.apidoc-3.4.0a1-py2.4.egg/zope/app/apidoc/codemodule/module.py",
line 57, in __init__
  File "/home/luciano/buildout-eggs/tmp8tH4Or/zope.app.apidoc-3.4.0a1-py2.4.egg/zope/app/apidoc/codemodule/module.py",
line 68, in __setup
OSError: [Errno 20] Not a directory:
'/home/luciano/buildout-eggs/zope.filerepresentation-3.4.0-py2.4.egg/zope'


More information about the Zope mailing list