[Epydoc-devel] AttributeError: _Sentinel instance has no attribute '__getitem__'
Brought to you by:
edloper
From: Nicholas C. <nic...@gm...> - 2007-03-29 15:01:30
|
On 3/29/07, Daniele Varrazzo <pi...@de...> wrote: > This bug has been already reported in the tracker, but i wasn't able to > reproduce it yet. > > Is the package you are documenting available on the web or is a private > project? It's a private project (for the moment at least - if only because the documentation is so poor!). > What is the command line you are using? epydoc --debug --output auto-doc/ npyscreen/ (npyscreen is the name of the package) > > Warning: Module npyscreen.ActionForm is shadowed by a variable with the > > same name. > > Correct me: in your package there is a module named "ActionForm.py" > containing a class named "ActionForm"? I suspect that this kind of errors > (and so issues like #1682525) are caused by a name clash like this, but i > don't have a test case yet (the people who reported the issue above gave me > one, but i have to setup a VM to test it and i haven't had the time to do > that yet). Yes, there is. I assume that the error is being caused by the fact that the __init__.py file for the package does things like the following to expose an API: from ActionForm import ActionForm > To work around the bug you may try to --introspect-only or --parse-only. > Please, report success/failures of doing this. --introspect-only fails with the same error --parse-only works perfectly, and doesn't give the warnings above. Instead I get the output I've printed below (minor warnings). Best wishes, Nicholas epydoc --parse-only --debug --output auto-doc/ npyscreen/ Warning: 6 markup errors were found while processing docstrings. Use the verbose switch (-v) to display markup errors. stav092:~/projects/spook/mnpyscreen nicholas$ epydoc -v --parse-only --debug --output auto-doc/ npyscreen/ +---------------------------------------------------------------------------------------------- | File /Users/nicholas/projects/spook/mnpyscreen/npyscreen/NPSAppManaged.py, line 11, in | npyscreen.NPSAppManaged.NPSAppManaged | Warning: Line 13: Lists must be indented. | +---------------------------------------------------------------------------------------------- | File /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/textwrap.py, line 33, in | textwrap.TextWrapper | Warning: Lines 41, 42, 44, 45, 47, 48, 50, 51, 54, 55, 59, 60, 63, 64: Improper paragraph | indentation. | +---------------------------------------------------------------------------------------------- | File /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/textwrap.py, line 147, | in textwrap.TextWrapper._fix_sentence_endings | Warning: Lines 149, 152: Improper paragraph indentation. | +---------------------------------------------------------------------------------------------- | File /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/textwrap.py, line 165, | in textwrap.TextWrapper._handle_long_word | Warning: Line 166: Improper paragraph indentation. | +---------------------------------------------------------------------------------------------- | File /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/textwrap.py, line 115, | in textwrap.TextWrapper._munge_whitespace | Warning: Lines 117, 121: Improper paragraph indentation. | +---------------------------------------------------------------------------------------------- | File /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/textwrap.py, line 132, | in textwrap.TextWrapper._split | Warning: Lines 137, 139: Improper paragraph indentation. | |