Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError while generating docs on Windows 10 #40

Open
asinha94 opened this issue Jul 18, 2017 · 5 comments
Open

IndexError while generating docs on Windows 10 #40

asinha94 opened this issue Jul 18, 2017 · 5 comments

Comments

@asinha94
Copy link

I am running doxypypy on Windows 10 and ran into the following exception. This seems to happen between reading and parsing a file which doesnt contain any docstrings or doxygen comments. I can't really share anything more as I work on a confidential project. I've gone through the files listed in the stacktrace below but can't seem to figure out why this would be the case.

Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\doxypypy.exe\__main__.py", line 9, in <module>
  File "c:\python27\lib\site-packages\doxypypy\doxypypy.py", line 830, in main
    astWalker.parseLines()
  File "c:\python27\lib\site-packages\doxypypy\doxypypy.py", line 743, in parseLines
    self.visit(inAst)
  File "c:\python27\lib\site-packages\doxypypy\doxypypy.py", line 569, in visit
    return visitor(node, containingNodes=containingNodes)
  File "c:\python27\lib\site-packages\doxypypy\doxypypy.py", line 595, in visit_Module
    []))
  File "c:\python27\lib\site-packages\doxypypy\doxypypy.py", line 553, in generic_visit
    self.visit(item, containingNodes=kwargs['containingNodes'])
  File "c:\python27\lib\site-packages\doxypypy\doxypypy.py", line 569, in visit
    return visitor(node, containingNodes=containingNodes)
  File "c:\python27\lib\site-packages\doxypypy\doxypypy.py", line 610, in visit_Assign
    match = AstWalker.__attributeRE.match(self.lines[lineNum])
IndexError: list index out of range
@asinha94
Copy link
Author

This might also explain why the doxypypy docstrings in a few other functions are not picked up

@asinha94 asinha94 changed the title Exception on Windows 10 IndexError while generating docs on Windows 10 Jul 18, 2017
@Feneric
Copy link
Owner

Feneric commented Jul 21, 2017

I don't have easy access to Windows 10, but getting an exception like that would definitely explain why some of the functions aren't getting picked up. Have you been able to reproduce it in any other environment? On a Win10 box you ought to be able to run doxypypy & Doxygen in either the Windows Bash Shell or Cygwin in addition to native, and doing so may provide some insight into what's happening.

@schperplata
Copy link

I'm experiencing the same issue. Since the thread is relatively old, did anyone found a solution/reason for this to happen?

@jeffdgithub
Copy link

This bug is also present under Windows 7, Python 3.7
C:\EDG\Blog\jeffd\Python\modules\p1>doxypypy -a -c -d p1.py

Module p1

Traceback (most recent call last):
File "C:\Python37\Scripts\doxypypy-script.py", line 11, in
load_entry_point('doxypypy==0.8.8.6', 'console_scripts', 'doxypypy')()
File "c:\python37\lib\site-packages\doxypypy\doxypypy.py", line 830, in main
astWalker.parseLines()
File "c:\python37\lib\site-packages\doxypypy\doxypypy.py", line 743, in parseLines
self.visit(inAst)
File "c:\python37\lib\site-packages\doxypypy\doxypypy.py", line 569, in visit
return visitor(node, containingNodes=containingNodes)
File "c:\python37\lib\site-packages\doxypypy\doxypypy.py", line 592, in visit_Module
self._processDocstring(node)
File "c:\python37\lib\site-packages\doxypypy\doxypypy.py", line 421, in _processDocstring
docstringConverter.send(lineInfo)
File "c:\python37\lib\site-packages\doxypypy\doxypypy.py", line 209, in __alterDocstring
lines[-1], inCodeBlock)
IndexError: list index out of range

@jeffdgithub
Copy link

Problem also exists under Lubuntu 18.04, Python 3.6
/EDG/Blog/jeffd/Python/modules/p1$ doxypypy -a -c p1.py
Traceback (most recent call last):
File "/home/jeffd/.local/bin/doxypypy", line 11, in
sys.exit(main())
File "/home/jeffd/.local/lib/python3.6/site-packages/doxypypy/doxypypy.py", line 830, in main
astWalker.parseLines()
File "/home/jeffd/.local/lib/python3.6/site-packages/doxypypy/doxypypy.py", line 743, in parseLines
self.visit(inAst)
File "/home/jeffd/.local/lib/python3.6/site-packages/doxypypy/doxypypy.py", line 569, in visit
return visitor(node, containingNodes=containingNodes)
File "/home/jeffd/.local/lib/python3.6/site-packages/doxypypy/doxypypy.py", line 592, in visit_Module
self._processDocstring(node)
File "/home/jeffd/.local/lib/python3.6/site-packages/doxypypy/doxypypy.py", line 421, in _processDocstring
docstringConverter.send(lineInfo)
File "/home/jeffd/.local/lib/python3.6/site-packages/doxypypy/doxypypy.py", line 209, in __alterDocstring
lines[-1], inCodeBlock)
IndexError: list index out of range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants