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

Class inheritance causes errors in dox2html5.py #44

Closed
Beefywhale opened this issue May 7, 2018 · 4 comments
Closed

Class inheritance causes errors in dox2html5.py #44

Beefywhale opened this issue May 7, 2018 · 4 comments
Assignees

Comments

@Beefywhale
Copy link

Using this code:

// Player.h
/**
* @brief Player class
*/
class Player: public Actor {
    ...
}

// Actor.h
/**
* @brief Actor class
*/
class Actor {
    ...
}

I get this error:

DEBUG:root:Parsing class_actor.xml
Traceback (most recent call last):
  File "dox2html5.py", line 2936, in <module>
    run(doxyfile, os.path.abspath(args.templates), args.wildcard, args.index_pages, search_merge_subtrees=not args.search_no_subtree_merging, search_add_lookahead_barriers=not args.search_no_lookahead_barriers, search_merge_prefixes=not args.search_no_prefix_merging)
  File "dox2html5.py", line 2854, in run
    parsed = parse_xml(state, file)
  File "dox2html5.py", line 2165, in parse_xml
    class_.name = symbol.leaf_name if symbol.parent.startswith(state.compounds[compound.id].parent) else symbol.name
AttributeError: 'NoneType' object has no attribute 'startswith'

It only happens when both Actor and Player are documented... My only guess is it has to do with the class inheritance.

@mosra mosra self-assigned this May 7, 2018
@mosra mosra added this to TODO in Doxygen theme via automation May 7, 2018
@mosra
Copy link
Owner

mosra commented May 7, 2018

Huh. What.

You win the award for reporting the most simple repro case I ever had with this project :D

It works when I wrap the classes in a namespace. 🤔 Investigating what the heck is wrong.

@mosra
Copy link
Owner

mosra commented May 7, 2018

Should be fixed in 4629958. Can you confirm it works for you?

Thanks! And thanks for reporting this, I'm embarrassed 🙈 😄

@Beefywhale
Copy link
Author

@mosra Thanks it works now!!!! 😄

@mosra
Copy link
Owner

mosra commented May 7, 2018

Yay! :)

@mosra mosra closed this as completed May 7, 2018
Doxygen theme automation moved this from TODO to Done May 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Doxygen theme
  
Done
Development

No branches or pull requests

2 participants