-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add python dump_tree example for Mac #211
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discovered a weird problem with the python bindings! We will need to do more investigation.
case acacia_axapi.ValueType_NODE: | ||
list = node.getNodeListValue(attribute) | ||
case acacia_axapi.ValueType_STRING: | ||
list = node.getStringListValue(attribute) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so I tried it -- I added to the ATTRIBUTES
list on line 7... and we get some weird exceptions caught in line 83 above.
The error is: error: in method 'AXAPINode_getStringListValue', argument 2 of type 'std::string &'
I took a look at the generated file build/lib/mac/CMakeFiles/python_acacia_axapi.dir/acacia_axapiPYTHON_wrap.cxx
, and it seems like the problem is with the attribute string...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It took me a bit to figure out, but eventually I realised it's (for some reason) because those attribute getters took a std::string&
rather than a const std::string&
and somehow that caused an error when converting the Python attribute name string to the C++ string. Seems to work now! Thanks so much for catching this!
case acacia_axapi.ValueType_NODE: | ||
list = node.getNodeListValue(attribute) | ||
case acacia_axapi.ValueType_STRING: | ||
list = node.getStringListValue(attribute) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It took me a bit to figure out, but eventually I realised it's (for some reason) because those attribute getters took a std::string&
rather than a const std::string&
and somehow that caused an error when converting the Python attribute name string to the C++ string. Seems to work now! Thanks so much for catching this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome! thanks for figuring it out :)
No description provided.