facelessuser / sublime-markdown-popups

Markdown popup dependency for Sublime
https://facelessuser.github.io/sublime-markdown-popups/
Other
112 stars 13 forks source link

Attribute Error #48

Closed gtalarico closed 7 years ago

gtalarico commented 7 years ago

Version: Sublime 3.0 Build 3143 Jedi: v0.10.1 mdpopups: 3.0.3

Steps to reproduce

# Create Class:
class Floor():
    """ WeWork Floor """

# Use Class:
floor = Floor  # with Cursor on Floor, hit Ctrl+Alt+D for Jedi DocString.

Console shows the following traceback:

mdpopups: Failed to get Sublime highlighter object!
Traceback (most recent call last):
  File "C:\Users\gtalarico\Dropbox\Shared\_Common\_Portable Apps\Sublime3\Data\Packages\Jedi - Python autocompletion\sublime_jedi\utils.py", line 32, in run_in_active_view
    callback(window.active_view(), response)
  File "C:\Users\gtalarico\Dropbox\Shared\_Common\_Portable Apps\Sublime3\Data\Packages\Jedi - Python autocompletion\sublime_jedi\helper.py", line 64, in render
    show_docstring_tooltip(view, docstring)
  File "C:\Users\gtalarico\Dropbox\Shared\_Common\_Portable Apps\Sublime3\Data\Packages\Jedi - Python autocompletion\sublime_jedi\tooltips\__init__.py", line 31, in show_docstring_tooltip
    tooltip.show_popup(view, docstring, location)
  File "C:\Users\gtalarico\Dropbox\Shared\_Common\_Portable Apps\Sublime3\Data\Packages\Jedi - Python autocompletion\sublime_jedi\tooltips\markdown.py", line 128, in show_popup
    content=self._build_html(view, docstring),
  File "C:\Users\gtalarico\Dropbox\Shared\_Common\_Portable Apps\Sublime3\Data\Packages\Jedi - Python autocompletion\sublime_jedi\tooltips\markdown.py", line 111, in _build_html
    content = mdpopups.md2html(view, content)
  File "C:\Users\GTALAR~1\Dropbox\Shared\_Common\_PORTA~1\Sublime3\Data\Packages\mdpopups\st3\mdpopups\__init__.py", line 447, in md2html
    ).convert(_markup_template(markup, template_vars, template_env_options)).replace('"', '"').replace('\n', '')
  File "C:\Users\GTALAR~1\Dropbox\Shared\_Common\_PORTA~1\Sublime3\Data\Packages\PYTHON~2\st3\markdown\__init__.py", line 368, in convert
    self.lines = prep.run(self.lines)
  File "C:\Users\GTALAR~1\Dropbox\Shared\_Common\_PORTA~1\Sublime3\Data\Packages\mdpopups\st3\mdpopups\mdx\superfences.py", line 502, in run
    lines = self.search_nested(lines)
  File "C:\Users\GTALAR~1\Dropbox\Shared\_Common\_PORTA~1\Sublime3\Data\Packages\mdpopups\st3\mdpopups\mdx\superfences.py", line 422, in search_nested
    self.eval(m, start, end)
  File "C:\Users\GTALAR~1\Dropbox\Shared\_Common\_PORTA~1\Sublime3\Data\Packages\mdpopups\st3\mdpopups\mdx\superfences.py", line 312, in eval
    self.process_nested_block(m, start, end)
  File "C:\Users\GTALAR~1\Dropbox\Shared\_Common\_PORTA~1\Sublime3\Data\Packages\mdpopups\st3\mdpopups\mdx\superfences.py", line 351, in process_nested_block
    code = entry["formatter"](self.rebuild_block(self.code), self.lang)
  File "C:\Users\GTALAR~1\Dropbox\Shared\_Common\_PORTA~1\Sublime3\Data\Packages\mdpopups\st3\mdpopups\mdx\superfences.py", line 469, in highlight
    linespecial=linespecial
  File "C:\Users\GTALAR~1\Dropbox\Shared\_Common\_PORTA~1\Sublime3\Data\Packages\mdpopups\st3\mdpopups\mdx\highlight.py", line 324, in highlight
    code = self.sublime_hl[1].syntax_highlight(
AttributeError: 'NoneType' object has no attribute 'syntax_highlight'
facelessuser commented 7 years ago

Please update to 3.1.1. See this discussion for information on how: https://github.com/facelessuser/BracketHighlighter/issues/449.

gtalarico commented 7 years ago

Thank you @facelessuser - upgrading to 3.1.1 fixed it.

facelessuser commented 7 years ago

Nice. Package Control screws up sometimes and doesn't update dependencies, or sometimes it messes up during the update and requires you to nuke the old version and let Package Control re-pull the dependency again.