An unhandled python exception crashes Epydoc command (during source
parsing, I guess).
I used the python-epydoc package from Ubuntu Gutsy (v.3.0beta1). I
also tried with Epydoc v3.0.1 (installed from Ubuntu Intrepid source
package) with the same result.
My Python interpreter is v2.5.1.
The first attached file contains the command line I used and the output
trace I get.
The second attached file contains the python module on which Epydoc
crashes (skin.py). Note that it is the only file, from my Python
package, where Epydoc crashes.
I don't know if my docstring syntax is correct, but I guess
that even if it was not, Epydoc should not crash but should give me a
human-readable error message.
Thank you in advance for your help.
From: Edward Loper <edloper@br...> - 2008-09-23 14:58:33
On Tue, Sep 23, 2008 at 10:09 AM, Damien Boucard - UbiCast
> An unhandled python exception crashes Epydoc command (during source
> parsing, I guess).
Yep, anytime epydoc crashes, that's a bug in epydoc. :) In this case,
epydoc is making assumptions about what the value of __all__ will look
like that may not always be true.. In particular, it's assuming that
it will contain a list or tuple of strings. In contrast, your module
__all__ = ("global_skin")
which is actually equivalent to:
__all__ = "global_skin"
(i.e., you're assigning a string value to __all__, not a list or tuple
-- remember, it's the comma(s) that makes a tuple, not the
parentheses.) Apparently Python is happy with this and does the right
thing, but epydoc doesn't. If you just want epydoc to work on your
file, then change that line to:
__all__ = ("global_skin",)
(Note the comma.) But this is also something that should get fixed in
epydoc, so I'll add a bug report for it to the epydoc bug tracker on
Le Tue, 23 Sep 2008 10:58:24 -0400,
"Edward Loper" <edloper@...> a écrit :
> (i.e., you're assigning a string value to __all__, not a list or tuple
> -- remember, it's the comma(s) that makes a tuple, not the
> parentheses.) Apparently Python is happy with this and does the right
> thing, but epydoc doesn't. If you just want epydoc to work on your
> file, then change that line to:
> __all__ = ("global_skin",)
Ho ! You're right !
As well as being a sexy doc generator, Epydoc is also a very powerful
syntax checker ! It detects errors that pychecker, pyflakes and pylint
Thank you for your quick answer.