Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pygmt/datasets/tile_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def load_tile_map(region, zoom="auto", source=None, lonlat=True, wait=0, max_ret

Raises
------
ModuleNotFoundError
If ``contextily`` is not installed. Follow
ImportError
If ``contextily`` is not installed or can't be imported. Follow
:doc:`install instructions for contextily <contextily:index>`, (e.g.
via ``pip install contextily``) before using this function.

Expand All @@ -109,7 +109,7 @@ def load_tile_map(region, zoom="auto", source=None, lonlat=True, wait=0, max_ret
"""
# pylint: disable=too-many-locals
if contextily is None:
raise ModuleNotFoundError(
raise ImportError(
"Package `contextily` is required to be installed to use this function. "
"Please use `pip install contextily` or "
"`conda install -c conda-forge contextily` "
Expand Down
2 changes: 1 addition & 1 deletion pygmt/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

try:
import IPython
except ModuleNotFoundError:
except ImportError:
IPython = None # pylint: disable=invalid-name


Expand Down
2 changes: 1 addition & 1 deletion pygmt/tests/test_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

try:
import IPython
except ModuleNotFoundError:
except ImportError:
IPython = None # pylint: disable=invalid-name


Expand Down