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: list index out of range -- if NOTE: lines are not separated by a blank line. #78

Open
dcdolson opened this issue Apr 15, 2021 · 2 comments

Comments

@dcdolson
Copy link

I found this could happen if there are two NOTE: or similar keyword on adjacent lines.

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.9/site-packages/doxypypy-0.8.8.6-py3.9.egg/doxypypy/doxypypy.py", line 927, in <module>
  File "/usr/local/lib/python3.9/site-packages/doxypypy-0.8.8.6-py3.9.egg/doxypypy/doxypypy.py", line 915, in main
  File "/usr/local/lib/python3.9/site-packages/doxypypy-0.8.8.6-py3.9.egg/doxypypy/doxypypy.py", line 796, in parseLines
  File "/usr/local/lib/python3.9/site-packages/doxypypy-0.8.8.6-py3.9.egg/doxypypy/doxypypy.py", line 586, in visit
  File "/usr/local/lib/python3.9/site-packages/doxypypy-0.8.8.6-py3.9.egg/doxypypy/doxypypy.py", line 618, in visit_Module
  File "/usr/local/lib/python3.9/site-packages/doxypypy-0.8.8.6-py3.9.egg/doxypypy/doxypypy.py", line 570, in generic_visit
  File "/usr/local/lib/python3.9/site-packages/doxypypy-0.8.8.6-py3.9.egg/doxypypy/doxypypy.py", line 586, in visit
  File "/usr/local/lib/python3.9/site-packages/doxypypy-0.8.8.6-py3.9.egg/doxypypy/doxypypy.py", line 777, in visit_ClassDef
  File "/usr/local/lib/python3.9/site-packages/doxypypy-0.8.8.6-py3.9.egg/doxypypy/doxypypy.py", line 438, in _processDocstring
  File "/usr/local/lib/python3.9/site-packages/doxypypy-0.8.8.6-py3.9.egg/doxypypy/doxypypy.py", line 216, in __alterDocstring
IndexError: list index out of range

E.g., if in a docstring

  NOTE: this is a note
  NOTE: this note is on the next line

@Feneric this helped me: dcdolson@6071fc6

Let me know if you want me to fix it in any way before creating a pull request.

@dcdolson
Copy link
Author

back-trace looks similar to #40

@dcdolson
Copy link
Author

I created PR #79 to address this.

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

1 participant