[Zope3-Users] How does the static-apidoc script works?

Florian Lindner mailinglists at xgm.de
Thu Sep 7 15:56:02 EDT 2006


Am Mittwoch, 6. September 2006 12:25 schrieb Stephan Richter:
> On Monday 14 August 2006 17:46, Florian Lindner wrote:
> > ow does that script works? Executing gives an error:
> >
> > florian at horus ~/Zope3 $ python utilities/static-apidoc
> > /home/florian/z3-doc/ Traceback (most recent call last):
> >   File "utilities/static-apidoc", line 37, in ?
> >     main()
> >   File "/home/florian/Zope3/src/zope/app/apidoc/static.py", line 504, in
> > main maker.start()
> >   File "/home/florian/Zope3/src/zope/app/apidoc/static.py", line 200, in
> > start self.browser._links_factory.urltags = urltags
> >   File "/home/florian/Zope3/src/mechanize/_mechanize.py", line 505, in
> > __getattr__
> >     raise AttributeError(
> > AttributeError: <class 'zope.app.apidoc.static.PublisherBrowser'>
> > instance has no attribute _links_factory (perhaps you forgot to
> > .select_form()?)
>
> You know, this is probably due to a new mechanize version. You would have
> to update the scripts probably to the latest mechanize.

I've managed to fix the script so far that it works with the OnlineBrowser() 
(self.browser = OnlineBrowser()).

If I use the PublisherBrowser() I get a ConfigurationError:

-> return chooseClasses(method, environment)
  /home/florian/Zope3/src/zope/app/publication/httpfactory.py(33)chooseClasses()
-> factory = factoryRegistry.lookup(method, content_type, environment)
  /home/florian/Zope3/src/zope/app/publication/requestpublicationregistry.py(97)lookup()
-> raise ConfigurationError('No registered publisher found '

Should I modify it in a way that it always uses the OnlineBrowser() and check 
in? 
Maybe I will have time to look into the problem with PublisherBrowser() but I 
doubt so since is examina time in university...

Here is some output from the script:

florian at horus ~/Zope3/utilities $ python static-apidoc /home/florian/z3-doc/
INFO: Starting retrieval.
Link   166: 
http://localhost:8080/++apidoc++/Code/ZConfig/schema/BaseParser/index.html
WARNING: Internal Server Error (500): 
http://localhost:8080/++apidoc++/Code/ZConfig/schema/BaseParser
WARNING: +-> Reference: http://localhost:8080/++apidoc++/Code/staticmenu.html
Link   553: 
http://localhost:8080/++apidoc++/Code/zope/app/authentication/idpicker/IdPicker/index.html
WARNING: Internal Server Error (500): 
http://localhost:8080/++apidoc++/Code/zope/app/authentication/idpicker/IdPicker
WARNING: +-> Reference: http://localhost:8080/++apidoc++/Code/staticmenu.html
Link   650: 
http://localhost:8080/++apidoc++/Code/zope/app/container/contained/ContainerModifiedEvent/index.html
WARNING: Internal Server Error (500): 
http://localhost:8080/++apidoc++/Code/zope/app/container/contained/ContainerModifiedEvent
WARNING: +-> Reference: http://localhost:8080/++apidoc++/Code/staticmenu.html
Link   656: 
http://localhost:8080/++apidoc++/Code/zope/app/container/contained/ObjectMovedEvent/index.html
WARNING: Internal Server Error (500): 
http://localhost:8080/++apidoc++/Code/zope/app/container/contained/ObjectMovedEvent
WARNING: +-> Reference: http://localhost:8080/++apidoc++/Code/staticmenu.html
Link  1198: 
http://localhost:8080/++apidoc++/Code/zope/app/workflow/stateful/xmlimportexport/XMLFormatChecker/index.html
WARNING: Internal Server Error (500): 
http://localhost:8080/++apidoc++/Code/zope/app/workflow/stateful/xmlimportexport/XMLFormatChecker
WARNING: +-> Reference: http://localhost:8080/++apidoc++/Code/staticmenu.html
Link  1200: 
http://localhost:8080/++apidoc++/Code/zope/app/workflow/stateful/xmlimportexport/XMLStatefulImporter/index.html
WARNING: Internal Server Error (500): 
http://localhost:8080/++apidoc++/Code/zope/app/workflow/stateful/xmlimportexport/XMLStatefulImporter
WARNING: +-> Reference: http://localhost:8080/++apidoc++/Code/staticmenu.html
Link  1237: 
http://localhost:8080/++apidoc++/Code/zope/component/interfaces/RegistrationEvent/index.html
WARNING: Internal Server Error (500): 
http://localhost:8080/++apidoc++/Code/zope/component/interfaces/RegistrationEvent
WARNING: +-> Reference: http://localhost:8080/++apidoc++/Code/staticmenu.html
Link  1269: 
http://localhost:8080/++apidoc++/Code/zope/configuration/xmlconfig/ConfigurationHandler/index.html
WARNING: Internal Server Error (500): 
http://localhost:8080/++apidoc++/Code/zope/configuration/xmlconfig/ConfigurationHandler
WARNING: +-> Reference: http://localhost:8080/++apidoc++/Code/staticmenu.html
Link  1365: 
http://localhost:8080/++apidoc++/Code/zope/fssync/metadata/EntriesHandler/index.html
WARNING: Internal Server Error (500): 
http://localhost:8080/++apidoc++/Code/zope/fssync/metadata/EntriesHandler
WARNING: +-> Reference: http://localhost:8080/++apidoc++/Code/staticmenu.html
Link  1846: http://localhost:8080/++apidoc++/Interface/file/index.htm


I terminated it at this point. At the end it gets very slow, about one link 
every two seconds, but it seems to work.

Should I check in?

Regards,

Florian


More information about the Zope3-users mailing list