Skip to content

Commit

Permalink
[Enhancement] Better error message on import error (closes #12)
Browse files Browse the repository at this point in the history
  • Loading branch information
johmedr committed Nov 26, 2024
1 parent c56a34c commit 51185e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spm/__wrapper__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
'_spm',
'resources',
'RuntimeInstaller.install')
print("Failed to import, install Matlab Runtime and setup library path. ")
print(f"Matlab Runtime installer can be found in: {installer_path}")
print("Failed to import spm._spm. This can be due to a failure to find Matlab Runtime. "
"Please verify that Matlab Runtime is installed and its path is set. "
"See https://www.mathworks.com/help/compiler/mcr-path-settings-for-run-time-deployment.html for instructions"
" on how to setup the path. If the issue persists, please open an issue with the entire error message at "
"https://github.com/spm/spm-python/issues.")

raise e

Expand Down

0 comments on commit 51185e2

Please sign in to comment.