matusnovak / doxybook

Generate GitBook, VuePress, Docsify, or MkDocs out of Doxygen XML output
https://matusnovak.github.io/doxybook/
MIT License
32 stars 15 forks source link

Not working with Python 3.6.5 on OS X 10.13.4 #1

Closed rspq closed 5 years ago

rspq commented 6 years ago

Running it with -h works fine but trying to use it to generate markdown gives:

Traceback (most recent call last):
  File "/usr/local/bin/doxybook", line 11, in <module>
    load_entry_point('doxybook==2.0.0', 'console_scripts', 'doxybook')()
  File "/usr/local/lib/python3.6/site-packages/doxybook-2.0.0-py3.6.egg/doxybook/__init__.py", line 67, in main
  File "/usr/local/lib/python3.6/site-packages/doxybook-2.0.0-py3.6.egg/doxybook/loader.py", line 77, in loadRoot
  File "/usr/local/lib/python3.6/site-packages/doxybook-2.0.0-py3.6.egg/doxybook/loader.py", line 12, in parseRoot
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/enum.py", line 291, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/enum.py", line 533, in __new__
    return cls._missing_(value)
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/enum.py", line 546, in _missing_
    raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 'interface' is not a valid Kind
rspq commented 6 years ago

Tried downgrading to Python 3.5.1 and get a different error:

File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/doxybook-2.0.0-py3.5.egg/doxybook/generators/member.py", line 217
    additionalRefids:List[str] = []
                    ^
SyntaxError: invalid syntax
matusnovak commented 6 years ago

Hi @rspq

When writing this little tool to parse doxygen xml, I did not realize you can mark classes as "interfaces", which was missing in the code, causing the exception. I have (hopefully) fixed it, also added it into an example: https://matusnovak.github.io/doxybook/docs/api/classexample_1_1_animal_interface.html

Try to download the latest master and give it a try.

Regarding the Python 3.5.1, this doxybook tool uses python typing all over the place. Python typing has been introduces in 3.6 and the "minimum version python 3.5" in the readme is false and will fix it. You have to use Python 3.6 or newer, sorry about the confusion.

matusnovak commented 5 years ago

Closing for inactivity.