oakmac / sublime-text-parinfer

Parinfer plugin for Sublime Text
ISC License
57 stars 8 forks source link

RuntimeError: unable to instantiate 'Parinfer.sublime-parinfer.ParinferInspectCommand' #47

Open efraimmgon opened 1 year ago

efraimmgon commented 1 year ago

Using ST 4

I'm getting the following error:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime_plugin.py", line 547, in create_text_commands
    o = cls(view)
  File "/Users/efraimmgon/Library/Application Support/Sublime Text/Installed Packages/Parinfer.sublime-package/sublime-parinfer.py", line 144, in __init__
    self.comment_char = get_comment_char(self.view)
  File "/Users/efraimmgon/Library/Application Support/Sublime Text/Installed Packages/Parinfer.sublime-package/sublime-parinfer.py", line 62, in get_comment_char
    srclang = get_syntax_language(view)
  File "/Users/efraimmgon/Library/Application Support/Sublime Text/Installed Packages/Parinfer.sublime-package/sublime-parinfer.py", line 51, in get_syntax_language
    regex_res = re.search(SYNTAX_LANGUAGE_RE, view.settings().get("syntax"))
  File "./python3.8/re.py", line 201, in search
TypeError: expected string or bytes-like object

The above exception was the direct cause of the following exception:

RuntimeError: unable to instantiate 'Parinfer.sublime-parinfer.ParinferInspectCommand'

Is anyone else getting that?

oakmac commented 1 year ago

I just released v1.2.0 to try and prevent this error. Let me know if that works?

Relevant commit: https://github.com/oakmac/sublime-text-parinfer/commit/bc4d51e7bc3007028685cdee762b0892230504d2