Skip to content

Commit

Permalink
Fix import error not giving traceback
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Nov 4, 2022
1 parent e9c2b70 commit 397b012
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pysr/julia_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,12 @@ def install(julia_project=None, quiet=False): # pragma: no cover


def _import_error():
raise ImportError(
"""
return """
Required dependencies are not installed or built. Run the following code in the Python REPL:
>>> import pysr
>>> pysr.install()
"""
)


def _process_julia_project(julia_project):
Expand Down Expand Up @@ -167,7 +165,7 @@ def init_julia(julia_project=None, quiet=False):
)

if not info.is_pycall_built():
_import_error()
raise ImportError(_import_error())

Main = None
try:
Expand Down

0 comments on commit 397b012

Please sign in to comment.