Skip to content

Commit

Permalink
Output OSError details to make import error more useful (#5997)
Browse files Browse the repository at this point in the history
  • Loading branch information
errissa authored Mar 16, 2023
1 parent 9238339 commit 28b4a0c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/open3d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,10 @@ def load_cdll(path):
"Open3D was built with CUDA support, but no suitable CUDA "
"devices found. If your system has CUDA devices, check your "
"CUDA drivers and runtime.", ImportWarning)
except OSError:
except OSError as os_error:
warnings.warn(
"Open3D was built with CUDA support, but CUDA libraries could "
"not be found! Check your CUDA installation. Falling back to the "
"CPU pybind library.", ImportWarning)
f'Open3D was built with CUDA support, but an error ocurred while loading the Open3D CUDA Python bindings. This is usually because the CUDA libraries could not be found. Check your CUDA installation. Falling back to the CPU pybind library. Reported error: {os_error}.',
ImportWarning)
except StopIteration:
warnings.warn(
"Open3D was built with CUDA support, but Open3D CUDA Python "
Expand Down

0 comments on commit 28b4a0c

Please sign in to comment.