Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure.show: Raise ImportError instead of GMTError if IPython is not installed but required #3580

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

seisman
Copy link
Member

@seisman seisman commented Nov 5, 2024

Description of proposed changes

When Figure.show(method="notebook") is called but IPython is not installed, we raise the GMTError exception, which is the base class for all GMT-related errors.

Raising such a low-level, base exception is usually not good. Instead, we should raise ImportError exception in this case.

@seisman seisman added enhancement Improving an existing feature needs review This PR has higher priority and needs review. labels Nov 5, 2024
@seisman seisman added this to the 0.14.0 milestone Nov 5, 2024
@michaelgrund michaelgrund added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Nov 5, 2024
@seisman seisman merged commit 38694be into main Nov 6, 2024
22 of 23 checks passed
@seisman seisman deleted the show/importerror branch November 6, 2024 03:39
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants