7

I've not used epydoc in the last 2 years but I found it very handy to take track of my classes and methods with a very little effort.

Today I installed latest version 3.0.1 but I get this error and searching around seems no solutions are provided.

Traceback (most recent call last):-] Parsing docstrings: pyramid.reques... 
  File "/home/neurino/apps/env/bin/epydoc", line 13, in <module>
    cli()
  File "/home/neurino/apps/env/lib/python2.7/site-packages/epydoc/cli.py", line 965, in cli
    main(options, names)
  File "/home/neurino/apps/env/lib/python2.7/site-packages/epydoc/cli.py", line 757, in main
    exclude_parse=exclude_parse)
  File "/home/neurino/apps/env/lib/python2.7/site-packages/epydoc/docbuilder.py", line 275, in build_doc_index
    parse_docstring(val_doc, docindex, suppress_warnings)
  File "/home/neurino/apps/env/lib/python2.7/site-packages/epydoc/docstringparser.py", line 265, in parse_docstring
    api_doc.summary, api_doc.other_docs = api_doc.descr.summary()
  File "/home/neurino/apps/env/lib/python2.7/site-packages/epydoc/markup/restructuredtext.py", line 179, in summary
    try: self._document.walk(visitor)
  File "/home/neurino/apps/env/lib/python2.7/site-packages/docutils/nodes.py", line 137, in walk
    if child.walk(visitor):
  File "/home/neurino/apps/env/lib/python2.7/site-packages/docutils/nodes.py", line 129, in walk
    visitor.dispatch_visit(self)
  File "/home/neurino/apps/env/lib/python2.7/site-packages/docutils/nodes.py", line 1604, in dispatch_visit
    return method(node)
  File "/home/neurino/apps/env/lib/python2.7/site-packages/epydoc/markup/restructuredtext.py", line 307, in visit_paragraph
    m = self._SUMMARY_RE.match(child.data)
AttributeError: 'Text' object has no attribute 'data'

Is epydoc project dead?

neurino
  • 11,500
  • 2
  • 40
  • 63
  • (When you can,) you should post this as an answer and accept it -- for future generations! – Katriel Jul 15 '11 at 09:52
  • I know but it won't let me add an answer until a certain amount of hours and often I forget about it so, for future generations, I'm leaving something this way... :) I hope to remember next days to add answer a real answer. – neurino Jul 15 '11 at 10:13
  • I was wrong... I can answer but not accept, thanks for the tip – neurino Jul 15 '11 at 10:14

3 Answers3

8

I found a patch on epydoc tracker, it was outdated anyway this part solves the problem:

markup/restructuredtext.py
307c307,310
<                 m = self._SUMMARY_RE.match(child.data)
---
>                 try:
>                     m = self._SUMMARY_RE.match(child.data)
>                 except AttributeError:
>                     m = None
neurino
  • 11,500
  • 2
  • 40
  • 63
6

Epydoc has not been maintained for long time and the last release is not quite compatible with current Pyton and docutils. It is still a useful tool, though, but needs some patching.

Here are some patches I used with Epydoc to build documentation for my Python 2.7 code: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/epydoc/ (they are part of the PLD-Linux Epydoc package).

I wish someone takes over the code and continue the development…

Jacek Konieczny
  • 8,283
  • 2
  • 23
  • 35
0

Objects can be tested against null (i.e. None) so that the exception could not be occurred.

if object is None:
Gürol Canbek
  • 1,096
  • 1
  • 14
  • 20