-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Custom syntax highlighting theme has been removed / Spyder crashes when a custom syntax highlighting theme has as color an invalid hex value #22970
Comments
Hey @paul18frr, thanks for reporting. You said:
That probably happened when you updated from Spyder 5 to 6 because we had to reset several default theme colors.
So, when after you set your own theme, Spyder crashes at startup? |
Yep |
@dalthviz, could you check if you're able to reproduce this problem on Windows? Thanks! |
@paul18frr could it be possible for you to run spyder in debug mode and check if any output related with the error is registered? For that, use an Anaconda Prompt with the env you have Spyder installed activated and try launching with something like Any further info in order to reproduce and better understand this is greatly appreciate! Let us know! |
Well, I cannot explain what I did wrong yesterday, because it works now => i've probably implemented wrong values (when typing, sometimes an extra character appeared like a bullet or a spade one during my trials :-) ... I may forgot to remove one ?!? ). Here after my theme which is no more no less than the original Spyder theme i'm using for years (actually since I started to play with the IDE :-) So sorry for the post |
This is very important information! I guess if any of the colors entered by users in their custom color scheme is not a valid hex color, then Spyder would crash in the way you described. @dalthviz, could you check if you're able to reproduce that on your side?
No worries! I think you revealed to us a critical error that we really need to fix. |
Thank you for the new info @paul18frr ! Adding a Traceback (most recent call last):
File "E:\Acer\Documentos\Spyder\spyder\bootstrap.py", line 214, in <module>
start.main()
File "E:\Acer\Documentos\Spyder\spyder\spyder\app\start.py", line 285, in main
mainwindow.main(options, args)
File "E:\Acer\Documentos\Spyder\spyder\spyder\app\mainwindow.py", line 1425, in main
mainwindow = create_window(MainWindow, app, splash, options, args)
File "E:\Acer\Documentos\Spyder\spyder\spyder\app\utils.py", line 370, in create_window
main.post_visible_setup()
File "E:\Acer\Documentos\Spyder\spyder\spyder\app\mainwindow.py", line 861, in post_visible_setup
plugin.on_mainwindow_visible()
File "E:\Acer\Documentos\Spyder\spyder\spyder\plugins\ipythonconsole\plugin.py", line 562, in on_mainwindow_visible
self.create_new_client(give_focus=False)
File "E:\Acer\Documentos\Spyder\spyder\spyder\plugins\ipythonconsole\plugin.py", line 687, in create_new_client
self.get_widget().create_new_client(
File "E:\Acer\Documentos\Spyder\spyder\spyder\plugins\ipythonconsole\widgets\main_widget.py", line 1696, in create_new_client
client = ClientWidget(
File "E:\Acer\Documentos\Spyder\spyder\spyder\plugins\ipythonconsole\widgets\client.py", line 148, in __init__
self.shellwidget = ShellWidget(
File "E:\Acer\Documentos\Spyder\spyder\spyder\plugins\ipythonconsole\widgets\shell.py", line 167, in __init__
super().__init__(*args, **kw)
File "E:\Acer\Documentos\Spyder\spyder\spyder\plugins\ipythonconsole\widgets\debugging.py", line 206, in __init__
super(DebuggingWidget, self).__init__(*args, **kwargs)
File "E:\Acer\Documentos\Spyder\spyder\spyder\plugins\ipythonconsole\widgets\debugging.py", line 85, in __init__
super(DebuggingHistoryWidget, self).__init__(*args, **kwargs)
File "e:\acer\documentos\spyder\spyder\external-deps\qtconsole\qtconsole\rich_jupyter_widget.py", line 71, in __init__
super().__init__(*args, **kw)
File "e:\acer\documentos\spyder\spyder\external-deps\qtconsole\qtconsole\jupyter_widget.py", line 129, in __init__
self._syntax_style_changed()
File "E:\Acer\Documentos\Spyder\spyder\spyder\plugins\ipythonconsole\widgets\shell.py", line 1439, in _syntax_style_changed
self._highlighter._style = create_style_class(self.syntax_style)
File "E:\Acer\Documentos\Spyder\spyder\spyder\plugins\ipythonconsole\utils\style.py", line 171, in create_style_class
class StyleClass(Style):
File "C:\Users\dalth\anaconda3\envs\spyder-dev\lib\site-packages\pygments\style.py", line 122, in __new__
ndef[0] = colorformat(styledef)
File "C:\Users\dalth\anaconda3\envs\spyder-dev\lib\site-packages\pygments\style.py", line 79, in colorformat
assert False, f"wrong color format {text!r}"
AssertionError: wrong color format '#b0e686!' |
Hi
I noticed that my personal (dark) theme was recently removed (maybe after an update) ; twice, i tried to re-create my theme:
I needed to reset and return to default settings to use Spyder
Paul
The text was updated successfully, but these errors were encountered: