Skip to content
Merged
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
11 changes: 9 additions & 2 deletions tidy3d/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def _check_tidy3d_extras_available():
raise Tidy3dImportError(
"The package 'tidy3d-extras' is absent. "
"Please install the 'tidy3d-extras' package using, for "
"example, 'pip install tidy3d[extras]'."
r"example, 'pip install tidy3d\[extras]'."
)

try:
Expand All @@ -210,6 +210,13 @@ def _check_tidy3d_extras_available():
"The package 'tidy3d-extras' did not initialize correctly."
) from exc

if not hasattr(tidy3d_extras_mod, "__version__"):
raise Tidy3dImportError(
"The package 'tidy3d-extras' did not initialize correctly. "
"Please install the 'tidy3d-extras' package using, for "
r"example, 'pip install tidy3d\[extras]'."
)

version = tidy3d_extras_mod.__version__

if version is None:
Expand All @@ -222,7 +229,7 @@ def _check_tidy3d_extras_available():
raise Tidy3dImportError(
f"The version of 'tidy3d-extras' is {version}, but the version of 'tidy3d' is {__version__}. "
"They must match. You can install the correct "
"version using 'pip install tidy3d[extras]'."
r"version using 'pip install tidy3d\[extras]'."
)

tidy3d_extras["mod"] = tidy3d_extras_mod
Expand Down
Loading