Skip to content
Christopher Bruns edited this page Mar 2, 2015 · 3 revisions

What to do when you see:

  • Runtime error: AttributeError: 'module' object has no attribute '<osg_class_you_tried_to_use>' when running a python script using osgpyplusplus. This means the class you are trying to use has not been wrapped in osgpyplusplus. Check the following:

    1. Is the class you are trying to use really a part of OpenSceneGraph version 3.2.1? Check the documentation.
    2. Does osgpyplusplus/src/modules/osg<module_name>/wrap_osg<module_name>.h #include the necessary header file? If not, #include the needed header file, rerun cmake, and rebuild osgpyplusplus
    3. If the needed headers are there, perhaps the class is excluded in osgpyplusplus/src/modules/osg<module_name>/wrap_module.py. Include the class you need, which may require adding some special handling code to make the wrapping work. Examine the various "wrap_module.py" files for examples of special handling.
  • Compile error: <something about undefined destructor> when building osgpyplusplus bindings.

    1. Find the offending class method by examining the wrapper file line mentioned in the final block of the error message.
    2. Identify the const-reference argument that is causing the trouble.
    3. Add a call to hack_osg_arg(...) in the appropriate wrap_module.py file.

Clone this wiki locally