Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Fail early when setting Text color to a non-colorlike.#19571
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
jklymak commentedFeb 24, 2021
but |
Otherwise, the error is only raised when drawing the artist, which isalways confusing. Also add a general `_check_color_like` mechanism anduse it for Line2D as well, instead of relying on a slightly strange`if not is_color_like(): check_in_list(get_named_colors_mapping())`call where the check_in_list *always* fails.
anntzer commentedFeb 24, 2021
Yes...? |
jklymak commentedFeb 24, 2021
Thats what the original bug was failing on, wasn't it? |
anntzer commentedFeb 24, 2021
Given that the traceback ends with |
QuLogic commentedMar 1, 2021
Don't see why this has to go in v3.4.1. @meeseeksdev backport to v3.4.x |
…571-on-v3.4.xBackport PR#19571 on branch v3.4.x (Fail early when setting Text color to a non-colorlike.)
Otherwise, the error is only raised when drawing the artist, which is
always confusing. Also add a general
_check_color_likemechanism anduse it for Line2D as well, instead of relying on a slightly strange
if not is_color_like(): check_in_list(get_named_colors_mapping())call where the check_in_listalways fails.
Closes#19569 (well, likely the OP was confused about other stuff, but this should at least bring the error message closer to the relevant place).
PR Summary
PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsand runflake8 --docstring-convention=all).doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).