Issue #217 wontfix

autogen aborts

timmie avatartimmie created an issue

I am using a easy_installed zip from yesterday's bitbucket tip.

sphinx-autogen -o generated/ gluon_autosummary.rst 
/usr/local/lib/python2.6/dist-packages/Jinja2-2.1.1-py2.6-linux-i686.egg/jinja2/sandbox.py:35: DeprecationWarning: the sets module is deprecated
  from sets import Set, ImmutableSet
[autosummary] generating autosummary for: gluon_autosummary.rst
[autosummary] writing to generated/
Traceback (most recent call last):
  File "/usr/local/bin/sphinx-autogen", line 8, in <module>
    load_entry_point('Sphinx==1.0dev-20090709', 'console_scripts', 'sphinx-autogen')()
  File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.0dev_20090709-py2.6.egg/sphinx/ext/autosummary/generate.py", line 53, in main
    template_dir=options.templates)
  File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.0dev_20090709-py2.6.egg/sphinx/ext/autosummary/generate.py", line 152, in generate_autosummary_docs
    get_members(obj, 'function')
  File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.0dev_20090709-py2.6.egg/sphinx/ext/autosummary/generate.py", line 141, in get_members
    if get_documenter(getattr(obj, name)).objtype == typ
  File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.0dev_20090709-py2.6.egg/sphinx/ext/autosummary/__init__.py", line 146, in get_documenter
    if issubclass(obj, Exception):
TypeError: issubclass() arg 1 must be a class

Comments (8)

  1. timmie

    using True for autosummary in config.py

    Exception occurred:
      File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.0dev_20090709-py2.6.egg/sphinx/ext/autosummary/__init__.py", line 146, in get_documenter
        if issubclass(obj, Exception):
    TypeError: issubclass() arg 1 must be a class
    
  2. Georg Brandl
    • changed status to open

    Can you try to find out what kind of object obj is? It must be a bit of a strange thing, since the issubclass() check is guarded by inspect.isclass().

  3. Anonymous

    The bug is in inspect.isclass(), it returns True if method has getattr defined. And next issubclass fails if it is passed an object. simple fix is change inspect.isclass to isinstance(obj, (types.ClassType, type))

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.