Epydoc AttributeError: Text object has no data attributes

I have not used epydoc in the last 2 years, but it was very convenient for me to keep track of my classes and methods with minimal effort.

Today I installed the latest version 3.0.1 , but I get this error and the search around it seems that 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 the epydoc project dead?

+6
source share
3 answers

Epydoc has not been supported for a long time, and the latest version is not entirely compatible with current Pyton and docutils. However, it is a useful tool, but it needs to be fixed.

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

I want someone to take over the code and continue development ...

+6
source

I found a patch for the epydoc tracker, it was deprecated, 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 
+8
source

Objects can be tested against null (i.e. None) so that an exception cannot be thrown.

 if object is None: 
0
source

Source: https://habr.com/ru/post/892816/


All Articles