Skip to content

C++ Types in Python DocumentationΒ #6867

Closed

Description

@timohl

Checklist

Describe the issue

The python binding documentation contains multiple instances where C++ types instead of Python types are used.
Example: docs/0.18.0/open3d.core.Device
2. __init__(self: open3d.cpu.pybind.core.Device, arg0: open3d::core::Device::DeviceType, arg1: int) -> None
(Same issue is in the current main, but I referenced 0.18.0 to have a stable link)

This also creates missing types when using pybind11-stubgen as recommended in #3052.
pybind11-stubgen reports this as an invalid expression error during generation:
pybind11_stubgen - [ ERROR] In open3d.cpu.pybind.core.Device.__init__ : Invalid expression 'open3d::core::Device::DeviceType'

The cause of this issue is that the declaration using py::class_ comes after the type is referenced in a function defined with .def(...).
See pybind11-docs: "Avoiding C++ types in docstrings"

Steps to reproduce the bug

I followed the standard build process:
Build from source
Build documentation

I used pybind11-stubgen open3d to get a list of errors (however there are several other issues shown)

Error message

Full error output of
pybind11-stubgen open3d

pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.core.Device.__init__ : Invalid expression 'open3d::core::Device::DeviceType'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.core.Device.get_type : Invalid expression 'open3d::core::Device::DeviceType'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.core.Dtype.__init__ : Invalid expression 'open3d::core::Dtype::DtypeCode'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.core.Dtype.byte_code : Invalid expression 'open3d::core::Dtype::DtypeCode'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.core.Tensor.from_dlpack : Can't find/import 'capsule'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.core.Tensor.to_dlpack : Can't find/import 'capsule'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.core.cuda.synchronize : Invalid expression 'open3d::core::Device'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.geometry.Geometry3D.get_minimal_oriented_bounding_box : Invalid expression 'open3d::geometry::OrientedBoundingBox'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.geometry.Geometry3D.get_oriented_bounding_box : Invalid expression 'open3d::geometry::OrientedBoundingBox'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.geometry.KDTreeFlann.__init__ : Can't find/import 'm'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.geometry.KDTreeFlann.__init__ : Can't find/import 'n'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.geometry.KDTreeFlann.__init__ : Invalid expression 'open3d::pipelines::registration::Feature'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.geometry.PointCloud.compute_convex_hull : Invalid expression 'open3d::geometry::TriangleMesh'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.geometry.PointCloud.create_from_depth_image : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.geometry.PointCloud.create_from_rgbd_image : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.geometry.TriangleMesh.textures. : Invalid expression 'open3d::geometry::Image'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.geometry.TriangleMesh.textures. : Invalid expression 'open3d::geometry::Image'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.io.rpc.set_mesh_data : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.odometry.compute_correspondence : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.odometry.compute_rgbd_odometry : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.Feature.data. : Can't find/import 'm'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.Feature.data. : Can't find/import 'n'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.Feature.data. : Can't find/import 'm'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.Feature.data. : Can't find/import 'n'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.TransformationEstimationForColoredICP.__init__ : Invalid expression 'open3d::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.TransformationEstimationForColoredICP.kernel. : Invalid expression 'open3d::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.TransformationEstimationForColoredICP.kernel. : Invalid expression 'open3d::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.TransformationEstimationForGeneralizedICP.__init__ : Invalid expression 'open3d::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.TransformationEstimationForGeneralizedICP.kernel. : Invalid expression 'open3d::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.TransformationEstimationForGeneralizedICP.kernel. : Invalid expression 'open3d::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.TransformationEstimationPointToPlane.__init__ : Invalid expression 'open3d::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.TransformationEstimationPointToPlane.kernel. : Invalid expression 'open3d::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.TransformationEstimationPointToPlane.kernel. : Invalid expression 'open3d::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.evaluate_registration : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.registration_colored_icp : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.registration_fgr_based_on_correspondence : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.registration_fgr_based_on_feature_matching : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.registration_generalized_icp : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.registration_icp : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.registration_icp : Invalid expression 'TransformationEstimationPointToPoint without scaling.'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.registration_ransac_based_on_correspondence : Invalid expression 'TransformationEstimationPointToPoint without scaling.'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.pipelines.registration.registration_ransac_based_on_feature_matching : Invalid expression 'TransformationEstimationPointToPoint without scaling.'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.AxisAlignedBoundingBox.get_oriented_bounding_box : Invalid expression 'open3d::t::geometry::OrientedBoundingBox'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.DrawableGeometry.material. : Invalid expression 'open3d::visualization::rendering::Material'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.DrawableGeometry.material. : Invalid expression 'open3d::visualization::rendering::Material'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.Image.resize : Invalid expression '<InterpType.Nearest: 0>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.LineSet.extrude_linear : Invalid expression 'open3d::t::geometry::TriangleMesh'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.LineSet.extrude_rotation : Invalid expression 'open3d::t::geometry::TriangleMesh'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.LineSet.get_axis_aligned_bounding_box : Invalid expression 'open3d::t::geometry::AxisAlignedBoundingBox'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.LineSet.get_oriented_bounding_box : Invalid expression 'open3d::t::geometry::OrientedBoundingBox'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.OrientedBoundingBox.create_from_points : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.PointCloud.compute_convex_hull : Invalid expression 'open3d::t::geometry::TriangleMesh'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.PointCloud.create_from_depth_image : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.PointCloud.create_from_rgbd_image : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.PointCloud.extrude_linear : Invalid expression 'open3d::t::geometry::LineSet'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.PointCloud.extrude_rotation : Invalid expression 'open3d::t::geometry::LineSet'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.PointCloud.get_axis_aligned_bounding_box : Invalid expression 'open3d::t::geometry::AxisAlignedBoundingBox'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.PointCloud.get_oriented_bounding_box : Invalid expression 'open3d::t::geometry::OrientedBoundingBox'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.PointCloud.hidden_point_removal : Invalid expression 'open3d::t::geometry::TriangleMesh'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.PointCloud.orient_normals_to_align_with_direction : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.PointCloud.orient_normals_towards_camera_location : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.TriangleMesh.from_triangle_mesh_model : Invalid expression 'open3d::visualization::rendering::TriangleMeshModel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.TriangleMesh.get_axis_aligned_bounding_box : Invalid expression 'open3d::t::geometry::AxisAlignedBoundingBox'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.geometry.TriangleMesh.get_oriented_bounding_box : Invalid expression 'open3d::t::geometry::OrientedBoundingBox'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.odometry.compute_odometry_information_matrix : Invalid expression 'open3d::t::geometry::Image'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.odometry.rgbd_odometry_multi_scale : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.TransformationEstimation.compute_transformation : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.TransformationEstimationForColoredICP.__init__ : Invalid expression 'open3d::t::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.TransformationEstimationForColoredICP.kernel. : Invalid expression 'open3d::t::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.TransformationEstimationForColoredICP.kernel. : Invalid expression 'open3d::t::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.TransformationEstimationForDopplerICP.__init__ : Invalid expression 'open3d::t::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.TransformationEstimationForDopplerICP.compute_transformation : Invalid expression 'open3d::t::geometry::PointCloud'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.TransformationEstimationForDopplerICP.doppler_kernel. : Invalid expression 'open3d::t::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.TransformationEstimationForDopplerICP.doppler_kernel. : Invalid expression 'open3d::t::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.TransformationEstimationForDopplerICP.geometric_kernel. : Invalid expression 'open3d::t::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.TransformationEstimationForDopplerICP.geometric_kernel. : Invalid expression 'open3d::t::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.TransformationEstimationPointToPlane.__init__ : Invalid expression 'open3d::t::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.TransformationEstimationPointToPlane.kernel. : Invalid expression 'open3d::t::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.TransformationEstimationPointToPlane.kernel. : Invalid expression 'open3d::t::pipelines::registration::RobustKernel'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.evaluate_registration : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.icp : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.multi_scale_icp : Invalid expression '(with default value)'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.registration.robust_kernel.RobustKernel.__init__ : Invalid expression '<RobustKernelMethod.L2Loss: 0>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slac.control_grid.deform : Invalid expression 'open3d::t::geometry::PointCloud'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slac.control_grid.deform : Invalid expression 'open3d::t::geometry::Image'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slac.control_grid.deform : Invalid expression 'open3d::t::geometry::RGBDImage'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slac.control_grid.parameterize : Invalid expression 'open3d::t::geometry::PointCloud'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slac.control_grid.touch : Invalid expression 'open3d::t::geometry::PointCloud'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slac.run_rigid_optimizer_for_fragments : Invalid expression 'SLACOptimizerParams[max_iterations=5, voxel_size=5.000000e-02, distance_threshold=7.000000e-02, fitness_threshold=3.000000e-01, regularizer_weight=1.000000e+00, device=CPU:0, slac_folder=].'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slac.run_rigid_optimizer_for_fragments : Invalid expression 'SLACDebugOption[debug=false, debug_start_node_idx=0].'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slac.run_slac_optimizer_for_fragments : Invalid expression 'SLACOptimizerParams[max_iterations=5, voxel_size=5.000000e-02, distance_threshold=7.000000e-02, fitness_threshold=3.000000e-01, regularizer_weight=1.000000e+00, device=CPU:0, slac_folder=].'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slac.run_slac_optimizer_for_fragments : Invalid expression 'SLACDebugOption[debug=false, debug_start_node_idx=0].'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slac.save_correspondences_for_pointclouds : Invalid expression 'SLACOptimizerParams[max_iterations=5, voxel_size=5.000000e-02, distance_threshold=7.000000e-02, fitness_threshold=3.000000e-01, regularizer_weight=1.000000e+00, device=CPU:0, slac_folder=].'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slac.save_correspondences_for_pointclouds : Invalid expression 'SLACDebugOption[debug=false, debug_start_node_idx=0].'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slam.Frame.get_data_as_image : Invalid expression 'open3d::t::geometry::Image'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slam.Frame.set_data_from_image : Invalid expression 'open3d::t::geometry::Image'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slam.Model.voxel_grid. : Invalid expression 'open3d::t::geometry::VoxelBlockGrid'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.t.pipelines.slam.Model.voxel_grid. : Invalid expression 'open3d::t::geometry::VoxelBlockGrid'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.Material.__init__ : Invalid expression 'open3d::visualization::rendering::MaterialRecord'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.RenderOption.mesh_color_option. : Invalid expression 'open3d::visualization::RenderOption::MeshColorOption'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.RenderOption.mesh_color_option. : Invalid expression 'open3d::visualization::RenderOption::MeshColorOption'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.RenderOption.mesh_shade_option. : Invalid expression 'open3d::visualization::RenderOption::MeshShadeOption'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.RenderOption.mesh_shade_option. : Invalid expression 'open3d::visualization::RenderOption::MeshShadeOption'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.RenderOption.point_color_option. : Invalid expression 'open3d::visualization::RenderOption::PointColorOption'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.RenderOption.point_color_option. : Invalid expression 'open3d::visualization::RenderOption::PointColorOption'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.VisualizerWithVertexSelection.get_picked_points : Invalid expression 'open3d::visualization::VisualizerWithVertexSelection::PickedPoint'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Application.add_window : Invalid expression 'open3d::visualization::gui::Window'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Application.create_window : Invalid expression 'open3d::visualization::gui::PyWindow'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Application.menubar. : Invalid expression 'open3d::visualization::gui::Menu'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Application.menubar. : Invalid expression 'open3d::visualization::gui::Menu'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Application.post_to_main_thread : Invalid expression 'open3d::visualization::gui::Window'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.CollapsableVert.__init__ : Invalid expression '<open3d.cpu.pybind.visualization.gui.Margins object at 0x7fa910ec70f0>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.CollapsableVert.__init__ : Invalid expression '<open3d.cpu.pybind.visualization.gui.Margins object at 0x7fa910f51170>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.FontDescription.__init__ : Invalid expression '<FontStyle.NORMAL: 0>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Horiz.__init__ : Invalid expression '<open3d.cpu.pybind.visualization.gui.Margins object at 0x7fa910f67570>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Horiz.__init__ : Invalid expression '<open3d.cpu.pybind.visualization.gui.Margins object at 0x7fa910f0c130>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.LayoutContext.theme. : Invalid expression 'open3d::visualization::gui::Theme'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.ScrollableVert.__init__ : Invalid expression '<open3d.cpu.pybind.visualization.gui.Margins object at 0x7fa913746530>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.ScrollableVert.__init__ : Invalid expression '<open3d.cpu.pybind.visualization.gui.Margins object at 0x7fa910ee78f0>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.VGrid.__init__ : Invalid expression '<open3d.cpu.pybind.visualization.gui.Margins object at 0x7fa94402b630>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.VGrid.__init__ : Invalid expression '<open3d.cpu.pybind.visualization.gui.Margins object at 0x7fa910ebe630>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Vert.__init__ : Invalid expression '<open3d.cpu.pybind.visualization.gui.Margins object at 0x7fa9440558f0>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Vert.__init__ : Invalid expression '<open3d.cpu.pybind.visualization.gui.Margins object at 0x7fa910f47230>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Window.add_child : Invalid expression 'open3d::visualization::gui::Widget'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Window.content_rect. : Invalid expression 'open3d::visualization::gui::Rect'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Window.os_frame. : Invalid expression 'open3d::visualization::gui::Rect'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Window.os_frame. : Invalid expression 'open3d::visualization::gui::Rect'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Window.set_focus_widget : Invalid expression 'open3d::visualization::gui::Widget'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Window.show_dialog : Invalid expression 'open3d::visualization::gui::Dialog'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Window.size. : Invalid expression 'open3d::visualization::gui::Size'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Window.size. : Invalid expression 'open3d::visualization::gui::Size'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.gui.Window.theme. : Invalid expression 'open3d::visualization::gui::Theme'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.rendering.OffscreenRenderer.scene. : Invalid expression 'open3d::visualization::rendering::Open3DScene'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.rendering.Renderer.add_texture : Invalid expression 'open3d::visualization::rendering::REHandle<(open3d::visualization::rendering::EntityType)10>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.rendering.Renderer.remove_texture : Invalid expression 'open3d::visualization::rendering::REHandle<(open3d::visualization::rendering::EntityType)10>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.rendering.Renderer.update_texture : Invalid expression 'open3d::visualization::rendering::REHandle<(open3d::visualization::rendering::EntityType)10>'
pybind11_stubgen - [  ERROR] In open3d.cpu.pybind.visualization.rendering.View.set_shadowing : Invalid expression '<ShadowType.PCF: 0>'
pybind11_stubgen - [WARNING] Enum-like str representations were found with no matching mapping to the enum class location.
Use `--enum-class-locations` to specify full path to the following enum(s):
 - ShadowType
 - InterpType
 - RobustKernelMethod
 - FontStyle
pybind11_stubgen - [WARNING] Raw C++ types/values were found in signatures extracted from docstrings.
Please check the corresponding sections of pybind11 documentation to avoid common mistakes in binding code:
 - https://pybind11.readthedocs.io/en/latest/advanced/misc.html#avoiding-cpp-types-in-docstrings
 - https://pybind11.readthedocs.io/en/latest/advanced/functions.html#default-arguments-revisited

Expected behavior

I would expect the python documentation and stubs generated using pybind11-stubgen to only contain python types and no c++ types.

Open3D, Python and System information

Should be a system independent issue, but here are my stats anyway:
- Operating system: Ubuntu 22.04
- Python version: 3.10.12 (main, Mar 22 2024, 16:50:05) [GCC 11.4.0]
- Open3D version: 0.18.0/main
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc 11.4.0

Additional information

No response

Activity

  1. added
    bug
    on Jul 14, 2024
  2. timohl commented on Jul 14, 2024

    @timohl
    ContributorAuthor

    I am currently working on splitting the pybind declarations and definitions to solve this: #6869.
    (Sorry for the double pull request. There was no option to change to draft after I accidentally opened it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions