Closed HeoJinLareine closed 2 years ago
You should check for nil using guard
or if
for those methods.
Yes, But the thing is that when I've tried that, It couldn't be guard let.. or if variable != nil.. Error comes out that PythonObject is try! object, so it couldn't be nil.
When I use .. [o3d.pipelines.registration.registration_colored_icp] this methods, and when results has no correspondence...
PythonKit/Python.swift:598: Fatal error: 'try!' expression unexpectedly raised an error: Python exception: [1;31m[Open3D Error] (virtual Eigen::Matrix4d open3d::pipelines::registration::TransformationEstimationForColoredICP::ComputeTransformation(const geometry::PointCloud &, const geometry::PointCloud &, const open3d::pipelines::registration::CorrespondenceSet &) const) /Users/runner/work/Open3D-iOS/Open3D-iOS/Open3D/cpp/open3d/pipelines/registration/ColoredICP.cpp:124: No correspondences found between source and target pointcloud. [0;m 2022-04-20 14:15:32.856663+0900 InnoScan[48440:12541993] PythonKit/Python.swift:598: Fatal error: 'try!' expression unexpectedly raised an error: Python exception: \^[[1;31m[Open3D Error] (virtual Eigen::Matrix4d open3d::pipelines::registration::TransformationEstimationForColoredICP::ComputeTransformation(const geometry::PointCloud &, const geometry::PointCloud &, const open3d::pipelines::registration::CorrespondenceSet &) const) /Users/runner/work/Open3D-iOS/Open3D-iOS/Open3D/cpp/open3d/pipelines/registration/ColoredICP.cpp:124: No correspondences found between source and target pointcloud. \^[[0;m
This error comes up.
I've made it worked with let - try, thank's to you!
Thanks to you, I'm happily running open3d on iOS. But in some methods of open3d, returns nil value. In python, I handle this with.. "try - except" phrase. How can I make same error handling in Open3D-iOS, actually in pythonKit?