-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
Incorret theme should not prevent napari from start #5605
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## main #5605 +/- ##
==========================================
+ Coverage 88.02% 89.52% +1.49%
==========================================
Files 610 610
Lines 51176 51215 +39
==========================================
+ Hits 45050 45849 +799
+ Misses 6126 5366 -760
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
brisvag
approved these changes
Mar 7, 2023
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.
Looks good to me!
goanpeca
approved these changes
Mar 7, 2023
Czaki
added a commit
that referenced
this pull request
Jun 18, 2023
# Description <!-- What does this pull request (PR) do? Why is it necessary? --> <!-- Tell us about your new feature, improvement, or fix! --> <!-- If your change includes user interface changes, please add an image, or an animation "An image is worth a thousand words!" --> <!-- You can use https://www.cockos.com/licecap/ or similar to create animations --> For the current implementation, the error in theme registration prevents the napari form from starting. It may be problematic for bundle users. In this PR I add `try: ... except` to handle an error during theme registration and convert it to logging exceptions. I use logging because it happened before creating GUI. ## Type of change <!-- Please delete options that are not relevant. --> - [x] Bug-fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update # References <!-- What resources, documentation, and guides were used in the creation of this PR? --> <!-- If this is a bug-fix or otherwise resolves an issue, reference it here with "closes #(issue)" --> # How has this been tested? <!-- Please describe the tests that you ran to verify your changes. --> - [ ] example: the test suite for my feature covers cases x, y, and z - [ ] example: all tests pass with my change - [ ] example: I check if my changes works with both PySide and PyQt backends as there are small differences between the two Qt bindings. Install `napari-gruvbox`, `pygments==2.6` (bellow 2.9) and start napari Example error message: ```python-traceback 11:52:01 ERROR Registration theme failed. 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-dark provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) Traceback (most recent call last): File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 391, in _install_npe2_themes register_theme(theme.id, theme_dict, manifest.name) File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 266, in register_theme theme = Theme(**theme) File "/home/czaki/Projekty/napari/napari/utils/events/evented_model.py", line 200, in __init__ super().__init__(**kwargs) File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-dark provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) 11:52:01 ERROR Registration theme failed. 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-light provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) Traceback (most recent call last): File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 391, in _install_npe2_themes register_theme(theme.id, theme_dict, manifest.name) File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 266, in register_theme theme = Theme(**theme) File "/home/czaki/Projekty/napari/napari/utils/events/evented_model.py", line 200, in __init__ super().__init__(**kwargs) File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-light provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) ``` ## Final checklist: - [ ] My PR is the minimum possible work for the desired functionality - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] If I included new strings, I have used `trans.` to make them localizable. For more information see our [translations guide](https://napari.org/developers/translations.html). --------- Co-authored-by: Lorenzo Gaifas <brisvag@gmail.com>
Czaki
added a commit
that referenced
this pull request
Jun 19, 2023
# Description <!-- What does this pull request (PR) do? Why is it necessary? --> <!-- Tell us about your new feature, improvement, or fix! --> <!-- If your change includes user interface changes, please add an image, or an animation "An image is worth a thousand words!" --> <!-- You can use https://www.cockos.com/licecap/ or similar to create animations --> For the current implementation, the error in theme registration prevents the napari form from starting. It may be problematic for bundle users. In this PR I add `try: ... except` to handle an error during theme registration and convert it to logging exceptions. I use logging because it happened before creating GUI. ## Type of change <!-- Please delete options that are not relevant. --> - [x] Bug-fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update # References <!-- What resources, documentation, and guides were used in the creation of this PR? --> <!-- If this is a bug-fix or otherwise resolves an issue, reference it here with "closes #(issue)" --> # How has this been tested? <!-- Please describe the tests that you ran to verify your changes. --> - [ ] example: the test suite for my feature covers cases x, y, and z - [ ] example: all tests pass with my change - [ ] example: I check if my changes works with both PySide and PyQt backends as there are small differences between the two Qt bindings. Install `napari-gruvbox`, `pygments==2.6` (bellow 2.9) and start napari Example error message: ```python-traceback 11:52:01 ERROR Registration theme failed. 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-dark provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) Traceback (most recent call last): File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 391, in _install_npe2_themes register_theme(theme.id, theme_dict, manifest.name) File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 266, in register_theme theme = Theme(**theme) File "/home/czaki/Projekty/napari/napari/utils/events/evented_model.py", line 200, in __init__ super().__init__(**kwargs) File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-dark provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) 11:52:01 ERROR Registration theme failed. 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-light provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) Traceback (most recent call last): File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 391, in _install_npe2_themes register_theme(theme.id, theme_dict, manifest.name) File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 266, in register_theme theme = Theme(**theme) File "/home/czaki/Projekty/napari/napari/utils/events/evented_model.py", line 200, in __init__ super().__init__(**kwargs) File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-light provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) ``` ## Final checklist: - [ ] My PR is the minimum possible work for the desired functionality - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] If I included new strings, I have used `trans.` to make them localizable. For more information see our [translations guide](https://napari.org/developers/translations.html). --------- Co-authored-by: Lorenzo Gaifas <brisvag@gmail.com>
Czaki
added a commit
that referenced
this pull request
Jun 21, 2023
# Description <!-- What does this pull request (PR) do? Why is it necessary? --> <!-- Tell us about your new feature, improvement, or fix! --> <!-- If your change includes user interface changes, please add an image, or an animation "An image is worth a thousand words!" --> <!-- You can use https://www.cockos.com/licecap/ or similar to create animations --> For the current implementation, the error in theme registration prevents the napari form from starting. It may be problematic for bundle users. In this PR I add `try: ... except` to handle an error during theme registration and convert it to logging exceptions. I use logging because it happened before creating GUI. ## Type of change <!-- Please delete options that are not relevant. --> - [x] Bug-fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update # References <!-- What resources, documentation, and guides were used in the creation of this PR? --> <!-- If this is a bug-fix or otherwise resolves an issue, reference it here with "closes #(issue)" --> # How has this been tested? <!-- Please describe the tests that you ran to verify your changes. --> - [ ] example: the test suite for my feature covers cases x, y, and z - [ ] example: all tests pass with my change - [ ] example: I check if my changes works with both PySide and PyQt backends as there are small differences between the two Qt bindings. Install `napari-gruvbox`, `pygments==2.6` (bellow 2.9) and start napari Example error message: ```python-traceback 11:52:01 ERROR Registration theme failed. 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-dark provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) Traceback (most recent call last): File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 391, in _install_npe2_themes register_theme(theme.id, theme_dict, manifest.name) File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 266, in register_theme theme = Theme(**theme) File "/home/czaki/Projekty/napari/napari/utils/events/evented_model.py", line 200, in __init__ super().__init__(**kwargs) File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-dark provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) 11:52:01 ERROR Registration theme failed. 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-light provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) Traceback (most recent call last): File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 391, in _install_npe2_themes register_theme(theme.id, theme_dict, manifest.name) File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 266, in register_theme theme = Theme(**theme) File "/home/czaki/Projekty/napari/napari/utils/events/evented_model.py", line 200, in __init__ super().__init__(**kwargs) File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-light provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) ``` ## Final checklist: - [ ] My PR is the minimum possible work for the desired functionality - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] If I included new strings, I have used `trans.` to make them localizable. For more information see our [translations guide](https://napari.org/developers/translations.html). --------- Co-authored-by: Lorenzo Gaifas <brisvag@gmail.com>
Czaki
added a commit
that referenced
this pull request
Jun 21, 2023
# Description <!-- What does this pull request (PR) do? Why is it necessary? --> <!-- Tell us about your new feature, improvement, or fix! --> <!-- If your change includes user interface changes, please add an image, or an animation "An image is worth a thousand words!" --> <!-- You can use https://www.cockos.com/licecap/ or similar to create animations --> For the current implementation, the error in theme registration prevents the napari form from starting. It may be problematic for bundle users. In this PR I add `try: ... except` to handle an error during theme registration and convert it to logging exceptions. I use logging because it happened before creating GUI. ## Type of change <!-- Please delete options that are not relevant. --> - [x] Bug-fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update # References <!-- What resources, documentation, and guides were used in the creation of this PR? --> <!-- If this is a bug-fix or otherwise resolves an issue, reference it here with "closes #(issue)" --> # How has this been tested? <!-- Please describe the tests that you ran to verify your changes. --> - [ ] example: the test suite for my feature covers cases x, y, and z - [ ] example: all tests pass with my change - [ ] example: I check if my changes works with both PySide and PyQt backends as there are small differences between the two Qt bindings. Install `napari-gruvbox`, `pygments==2.6` (bellow 2.9) and start napari Example error message: ```python-traceback 11:52:01 ERROR Registration theme failed. 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-dark provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) Traceback (most recent call last): File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 391, in _install_npe2_themes register_theme(theme.id, theme_dict, manifest.name) File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 266, in register_theme theme = Theme(**theme) File "/home/czaki/Projekty/napari/napari/utils/events/evented_model.py", line 200, in __init__ super().__init__(**kwargs) File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-dark provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) 11:52:01 ERROR Registration theme failed. 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-light provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) Traceback (most recent call last): File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 391, in _install_npe2_themes register_theme(theme.id, theme_dict, manifest.name) File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 266, in register_theme theme = Theme(**theme) File "/home/czaki/Projekty/napari/napari/utils/events/evented_model.py", line 200, in __init__ super().__init__(**kwargs) File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-light provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) ``` ## Final checklist: - [ ] My PR is the minimum possible work for the desired functionality - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] If I included new strings, I have used `trans.` to make them localizable. For more information see our [translations guide](https://napari.org/developers/translations.html). --------- Co-authored-by: Lorenzo Gaifas <brisvag@gmail.com>
Czaki
added a commit
that referenced
this pull request
Jun 21, 2023
# Description <!-- What does this pull request (PR) do? Why is it necessary? --> <!-- Tell us about your new feature, improvement, or fix! --> <!-- If your change includes user interface changes, please add an image, or an animation "An image is worth a thousand words!" --> <!-- You can use https://www.cockos.com/licecap/ or similar to create animations --> For the current implementation, the error in theme registration prevents the napari form from starting. It may be problematic for bundle users. In this PR I add `try: ... except` to handle an error during theme registration and convert it to logging exceptions. I use logging because it happened before creating GUI. ## Type of change <!-- Please delete options that are not relevant. --> - [x] Bug-fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update # References <!-- What resources, documentation, and guides were used in the creation of this PR? --> <!-- If this is a bug-fix or otherwise resolves an issue, reference it here with "closes #(issue)" --> # How has this been tested? <!-- Please describe the tests that you ran to verify your changes. --> - [ ] example: the test suite for my feature covers cases x, y, and z - [ ] example: all tests pass with my change - [ ] example: I check if my changes works with both PySide and PyQt backends as there are small differences between the two Qt bindings. Install `napari-gruvbox`, `pygments==2.6` (bellow 2.9) and start napari Example error message: ```python-traceback 11:52:01 ERROR Registration theme failed. 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-dark provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) Traceback (most recent call last): File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 391, in _install_npe2_themes register_theme(theme.id, theme_dict, manifest.name) File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 266, in register_theme theme = Theme(**theme) File "/home/czaki/Projekty/napari/napari/utils/events/evented_model.py", line 200, in __init__ super().__init__(**kwargs) File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-dark provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) 11:52:01 ERROR Registration theme failed. 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-light provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) Traceback (most recent call last): File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 391, in _install_npe2_themes register_theme(theme.id, theme_dict, manifest.name) File "/home/czaki/Projekty/napari/napari/utils/theme.py", line 266, in register_theme theme = Theme(**theme) File "/home/czaki/Projekty/napari/napari/utils/events/evented_model.py", line 200, in __init__ super().__init__(**kwargs) File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for Theme syntax_style Incorrect `syntax_style` value: gruvbox-light provided. Please use one of the following: default, emacs, friendly, colorful, autumn, murphy, manni, monokai, perldoc, pastie, borland, trac, native, fruity, bw, vim, vs, tango, rrt, xcode, igor, paraiso-light, paraiso-dark, lovelace, algol, algol_nu, arduino, rainbow_dash, abap, solarized-dark, solarized-light, sas, stata, stata-light, stata-dark, inkpot (type=assertion_error) ``` ## Final checklist: - [ ] My PR is the minimum possible work for the desired functionality - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] If I included new strings, I have used `trans.` to make them localizable. For more information see our [translations guide](https://napari.org/developers/translations.html). --------- Co-authored-by: Lorenzo Gaifas <brisvag@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bugfix
PR with bugfix
tests
Something related to our tests
triaged-0.4.18
To mark PR that is triaged in 0.4.18 release process
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
For the current implementation, the error in theme registration prevents the napari form from starting. It may be problematic for bundle users.
In this PR I add
try: ... except
to handle an error during theme registration and convert it to logging exceptions. I use logging because it happened before creating GUI.Type of change
References
How has this been tested?
as there are small differences between the two Qt bindings.
Install
napari-gruvbox
,pygments==2.6
(bellow 2.9) and start napariExample error message:
Final checklist:
trans.
to make them localizable.For more information see our translations guide.