-
Notifications
You must be signed in to change notification settings - Fork 224
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
GMT_DATASET: Add workaround for None values in the trailing text #3174
Conversation
014561d
to
d6ffe1a
Compare
d6ffe1a
to
056fe4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor suggestions.
"It's likely caused by an upstream GMT API bug. " | ||
"Please consider reporting to us." | ||
) | ||
warnings.warn(msg, category=RuntimeWarning, stacklevel=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warnings.warn(msg, category=RuntimeWarning, stacklevel=1) | |
warnings.warn(msg, category=RuntimeWarning, stacklevel=2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stacklevel=1
makes more sense here.
stacklevel=1
:
pygmt/datatypes/dataset.py:166: RuntimeWarning: The trailing text column contains `None' values and has been replace with an empty string to avoid TypeError exceptions. It's likely caused by an upstream GMT API bug. Please consider reporting to us.
warnings.warn(msg, category=RuntimeWarning, stacklevel=1)
stacklevel=2
:
pygmt/clib/session.py:1940: RuntimeWarning: The trailing text column contains `None' values and has been replace with an empty string to avoid TypeError exceptions. It's likely caused by an upstream GMT API bug. Please consider reporting to us.
return result.to_strings()
Co-authored-by: Wei Ji <[email protected]>
Co-authored-by: Wei Ji <[email protected]>
Description of proposed changes
Workaround for #3170. A test is also added.