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

Crashed in Sublime build 4084 #755

Open
max-mykhailenko opened this issue Aug 26, 2020 · 2 comments
Open

Crashed in Sublime build 4084 #755

max-mykhailenko opened this issue Aug 26, 2020 · 2 comments

Comments

@max-mykhailenko
Copy link

In the next dev build of sublime got next problem. Is it possible to fix, new Sublime is pretty nice!

Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "/Users/max/Library/Application Support/Sublime Text 3/Packages/TypeScript/typescript/libs/node_client.py", line 295, in __reader
    if NodeCommClient.read_msg(stream, msgq, asyncReq, proc, eventHandlers):
  File "/Users/max/Library/Application Support/Sublime Text 3/Packages/TypeScript/typescript/libs/node_client.py", line 194, in read_msg
    callback(data_dict)
  File "/Users/max/Library/Application Support/Sublime Text 3/Packages/TypeScript/typescript/commands/quick_info.py", line 148, in <lambda>
    cli.service.quick_info_full(self.view.file_name(), get_location_from_position(self.view, display_point), lambda response: self.handle_quick_info(response, display_point))
  File "/Users/max/Library/Application Support/Sublime Text 3/Packages/TypeScript/typescript/commands/quick_info.py", line 74, in handle_quick_info
    self.show_tooltip_popup(display_point, errors, error_html, info_text, info_str, doc_str)
  File "/Users/max/Library/Application Support/Sublime Text 3/Packages/TypeScript/typescript/commands/quick_info.py", line 80, in show_tooltip_popup
    theme_styles = get_theme_styles(self.view)
  File "/Users/max/Library/Application Support/Sublime Text 3/Packages/TypeScript/typescript/libs/popup_formatter.py", line 26, in get_theme_styles
    "type": format_css(view.style_for_scope("entity.name.type.class.ts")),
  File "/Users/max/Library/Application Support/Sublime Text 3/Packages/TypeScript/typescript/libs/popup_formatter.py", line 12, in format_css
    if (style["bold"]):
KeyError: 'bold'
@radekmie
Copy link

radekmie commented Sep 8, 2020

I can confirm that this happens in all 40xx builds, starting from 4065, including the (currently latest) 4085. The problem is here (as the stack trace says), but I'm not sure what exactly changed (I couldn't find anything in the changelogs). Maybe a simple hasattr workaround would be "good enough" for now?

EDIT: I confirm that it works with an additional hasattr fix, but all popups are now monochrome (actually with no styling at all).

@ephemer
Copy link

ephemer commented Sep 22, 2020

FYI @radekmie @max-mykhailenko I have submitted a PR to fix the issue in #758. It does not suffer from the monochrome / unstyled issue described by @radekmie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants