Comment 5 for bug 614605

Revision history for this message
Allo (allo) wrote :

oh, thanks for the feedback on the issue.

i tried a bit, the problem is the __init__.py in the package pluginSupport. Delete it, and it works. you see it in the linked git commit.

there seems to be a problem, that both the package and a file have the name pluginSupport. if i move pluginSupport.py to plSupport.py, i get an error in the html-generation, not in the subclasses place.

another thing i tried (without understand much of your code) is "if o:" -> 'if o and hasattr(o, "subclasses"):'. this also moves the exception to another place.

the error with plSupport.py instead of pluginSupport.py:

writing html to doc/api/ using pydoctor.html.SystemWriter
Traceback (most recent call last):
  File "/usr/bin/pydoctor", line 5, in <module>
    main(sys.argv[1:])
  File "/usr/lib/pymodules/python2.6/pydoctor/driver.py", line 287, in main
    writer.writeIndividualFiles(subjects, options.htmlfunctionpages)
  File "/usr/lib/pymodules/python2.6/pydoctor/html.py", line 185, in writeIndividualFiles
    self.writeIndividualFiles(sub.orderedcontents, functionpages)
  File "/usr/lib/pymodules/python2.6/pydoctor/html.py", line 185, in writeIndividualFiles
    self.writeIndividualFiles(sub.orderedcontents, functionpages)
  File "/usr/lib/pymodules/python2.6/pydoctor/html.py", line 185, in writeIndividualFiles
    self.writeIndividualFiles(sub.orderedcontents, functionpages)
  File "/usr/lib/pymodules/python2.6/pydoctor/html.py", line 185, in writeIndividualFiles
    self.writeIndividualFiles(sub.orderedcontents, functionpages)
  File "/usr/lib/pymodules/python2.6/pydoctor/html.py", line 185, in writeIndividualFiles
    self.writeIndividualFiles(sub.orderedcontents, functionpages)
  File "/usr/lib/pymodules/python2.6/pydoctor/html.py", line 181, in writeIndividualFiles
    html = self.getHTMLFor(sub)
  File "/usr/lib/pymodules/python2.6/pydoctor/html.py", line 194, in getHTMLFor
    d = fun(o)
  File "/usr/lib/pymodules/python2.6/pydoctor/html.py", line 316, in html_TwistedClass
    x += self._genChildren(cls.orderedcontents, link=link_)
  File "/usr/lib/pymodules/python2.6/pydoctor/html.py", line 370, in _genChildren
    'doc': summaryDoc(obj)}
  File "/usr/lib/pymodules/python2.6/pydoctor/html.py", line 30, in summaryDoc
    return doc2html(obj, doc)
  File "/usr/lib/pymodules/python2.6/pydoctor/html.py", line 53, in g
    r = _cache[args] = f(*args)
  File "/usr/lib/pymodules/python2.6/pydoctor/html.py", line 84, in doc2html
    crap = pdoc.to_html(_EpydocLinker(obj))
AttributeError: 'NoneType' object has no attribute 'to_html'