Skip to content

Commit

Permalink
[Bug] Fix for environment detection in barebones environments. (#1076)
Browse files Browse the repository at this point in the history
  • Loading branch information
nopdive authored Nov 11, 2024
1 parent c7e2fbc commit 13ef66e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guidance/visual/_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _detect_ipython(flags: EnvFlags) -> bool:
try:
from IPython import get_ipython
found = get_ipython() is not None
except NameError: # pragma: no cover
except (NameError, ImportError): # pragma: no cover
pass
return found

Expand All @@ -129,7 +129,7 @@ def _detect_ipython_zmq(flags: EnvFlags) -> bool:
found = False # Terminal running IPython
else:
found = False # Other type (?)
except NameError: # pragma: no cover
except (NameError, ImportError): # pragma: no cover
found = False # Probably standard Python interpreter

flags.is_notebook |= found
Expand Down

0 comments on commit 13ef66e

Please sign in to comment.