You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ModuleNotFoundError exception when IPython in not installed #1241
python ~/bad.py (this is the script posted above)
Traceback (most recent call last):
File "/Users/pwessel/bad.py", line 2, in <module>
import pygmt
File "/Users/pwessel/GMTdev/pygmt/pygmt/__init__.py", line 28, in <module>
from pygmt.figure import Figure, set_display
File "/Users/pwessel/GMTdev/pygmt/pygmt/figure.py", line 9, in <module>
import IPython
ModuleNotFoundError: No module named 'IPython'
Activity
seisman commentedon Apr 26, 2021
pygmt/pygmt/figure.py
Lines 8 to 11 in 7466dc3
When IPython is not installed, it raises a
ModuleNotFoundErrorexception, but the code incorrectly checks theKeyErrorexception.We should fix it and ideally add a test.