facelessuser / ApplySyntax

Syntax detector for Sublime Text
https://facelessuser.github.io/ApplySyntax/
343 stars 48 forks source link

Lots of ApplySyntax exceptions on ST startup #130

Closed mattst closed 5 years ago

mattst commented 5 years ago

I'm getting a mass of exceptions from ApplySyntax on Sublime Text startup. However the rules set in my syntaxes setting still work fine.

Please note that in my ApplySyntax settings file both reraise_exceptions and debug are set to false.

I have no idea if this is due to version 3200 having been installed, I only noticed the exceptions today but I do not usually look at the console after startup.

startup, version: 3200 linux x64 channel: stable
...cut...
plugins loaded
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 478, in run_callback
    expr()
  File "/opt/sublime_text/sublime_plugin.py", line 517, in <lambda>
    run_callback('on_load', callback, lambda: callback.on_load(v))
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 348, in on_load
    self.detect_syntax(view)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 379, in detect_syntax
    if self.syntax_matches(syntax):
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 491, in syntax_matches
    result = self.extension_matches(rule)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 545, in extension_matches
    file_name = os.path.basename(self.file_name).lower()
  File "./python3.3/posixpath.py", line 142, in basename
AttributeError: 'NoneType' object has no attribute 'rfind'
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 478, in run_callback
    expr()
  File "/opt/sublime_text/sublime_plugin.py", line 517, in <lambda>
    run_callback('on_load', callback, lambda: callback.on_load(v))
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 348, in on_load
    self.detect_syntax(view)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 379, in detect_syntax
    if self.syntax_matches(syntax):
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 491, in syntax_matches
    result = self.extension_matches(rule)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 545, in extension_matches
    file_name = os.path.basename(self.file_name).lower()
  File "./python3.3/posixpath.py", line 142, in basename
AttributeError: 'NoneType' object has no attribute 'rfind'
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 478, in run_callback
    expr()
  File "/opt/sublime_text/sublime_plugin.py", line 517, in <lambda>
    run_callback('on_load', callback, lambda: callback.on_load(v))
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 348, in on_load
    self.detect_syntax(view)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 379, in detect_syntax
    if self.syntax_matches(syntax):
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 491, in syntax_matches
    result = self.extension_matches(rule)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 545, in extension_matches
    file_name = os.path.basename(self.file_name).lower()
  File "./python3.3/posixpath.py", line 142, in basename
AttributeError: 'NoneType' object has no attribute 'rfind'
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 478, in run_callback
    expr()
  File "/opt/sublime_text/sublime_plugin.py", line 517, in <lambda>
    run_callback('on_load', callback, lambda: callback.on_load(v))
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 348, in on_load
    self.detect_syntax(view)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 379, in detect_syntax
    if self.syntax_matches(syntax):
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 491, in syntax_matches
    result = self.extension_matches(rule)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 545, in extension_matches
    file_name = os.path.basename(self.file_name).lower()
  File "./python3.3/posixpath.py", line 142, in basename
AttributeError: 'NoneType' object has no attribute 'rfind'
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 478, in run_callback
    expr()
  File "/opt/sublime_text/sublime_plugin.py", line 517, in <lambda>
    run_callback('on_load', callback, lambda: callback.on_load(v))
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 348, in on_load
    self.detect_syntax(view)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 379, in detect_syntax
    if self.syntax_matches(syntax):
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 491, in syntax_matches
    result = self.extension_matches(rule)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 545, in extension_matches
    file_name = os.path.basename(self.file_name).lower()
  File "./python3.3/posixpath.py", line 142, in basename
AttributeError: 'NoneType' object has no attribute 'rfind'
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 478, in run_callback
    expr()
  File "/opt/sublime_text/sublime_plugin.py", line 517, in <lambda>
    run_callback('on_load', callback, lambda: callback.on_load(v))
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 348, in on_load
    self.detect_syntax(view)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 379, in detect_syntax
    if self.syntax_matches(syntax):
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 491, in syntax_matches
    result = self.extension_matches(rule)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 545, in extension_matches
    file_name = os.path.basename(self.file_name).lower()
  File "./python3.3/posixpath.py", line 142, in basename
AttributeError: 'NoneType' object has no attribute 'rfind'
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 478, in run_callback
    expr()
  File "/opt/sublime_text/sublime_plugin.py", line 517, in <lambda>
    run_callback('on_load', callback, lambda: callback.on_load(v))
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 348, in on_load
    self.detect_syntax(view)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 379, in detect_syntax
    if self.syntax_matches(syntax):
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 491, in syntax_matches
    result = self.extension_matches(rule)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 545, in extension_matches
    file_name = os.path.basename(self.file_name).lower()
  File "./python3.3/posixpath.py", line 142, in basename
AttributeError: 'NoneType' object has no attribute 'rfind'
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 478, in run_callback
    expr()
  File "/opt/sublime_text/sublime_plugin.py", line 517, in <lambda>
    run_callback('on_load', callback, lambda: callback.on_load(v))
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 348, in on_load
    self.detect_syntax(view)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 379, in detect_syntax
    if self.syntax_matches(syntax):
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 491, in syntax_matches
    result = self.extension_matches(rule)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 545, in extension_matches
    file_name = os.path.basename(self.file_name).lower()
  File "./python3.3/posixpath.py", line 142, in basename
AttributeError: 'NoneType' object has no attribute 'rfind'
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 478, in run_callback
    expr()
  File "/opt/sublime_text/sublime_plugin.py", line 517, in <lambda>
    run_callback('on_load', callback, lambda: callback.on_load(v))
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 348, in on_load
    self.detect_syntax(view)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 379, in detect_syntax
    if self.syntax_matches(syntax):
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 491, in syntax_matches
    result = self.extension_matches(rule)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 545, in extension_matches
    file_name = os.path.basename(self.file_name).lower()
  File "./python3.3/posixpath.py", line 142, in basename
AttributeError: 'NoneType' object has no attribute 'rfind'
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 478, in run_callback
    expr()
  File "/opt/sublime_text/sublime_plugin.py", line 517, in <lambda>
    run_callback('on_load', callback, lambda: callback.on_load(v))
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 348, in on_load
    self.detect_syntax(view)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 379, in detect_syntax
    if self.syntax_matches(syntax):
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 491, in syntax_matches
    result = self.extension_matches(rule)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 545, in extension_matches
    file_name = os.path.basename(self.file_name).lower()
  File "./python3.3/posixpath.py", line 142, in basename
AttributeError: 'NoneType' object has no attribute 'rfind'
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 478, in run_callback
    expr()
  File "/opt/sublime_text/sublime_plugin.py", line 517, in <lambda>
    run_callback('on_load', callback, lambda: callback.on_load(v))
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 348, in on_load
    self.detect_syntax(view)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 379, in detect_syntax
    if self.syntax_matches(syntax):
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 491, in syntax_matches
    result = self.extension_matches(rule)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 545, in extension_matches
    file_name = os.path.basename(self.file_name).lower()
  File "./python3.3/posixpath.py", line 142, in basename
AttributeError: 'NoneType' object has no attribute 'rfind'
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 478, in run_callback
    expr()
  File "/opt/sublime_text/sublime_plugin.py", line 517, in <lambda>
    run_callback('on_load', callback, lambda: callback.on_load(v))
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 348, in on_load
    self.detect_syntax(view)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 379, in detect_syntax
    if self.syntax_matches(syntax):
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 491, in syntax_matches
    result = self.extension_matches(rule)
  File "/home/ms/.config/sublime-text-3/Installed Packages/ApplySyntax.sublime-package/ApplySyntax.py", line 545, in extension_matches
    file_name = os.path.basename(self.file_name).lower()
  File "./python3.3/posixpath.py", line 142, in basename
AttributeError: 'NoneType' object has no attribute 'rfind'
reloading settings Packages/User/ApplySyntax.ext-list
...cut...
facelessuser commented 5 years ago

I'd try restarting Sublime. If that doesn't fix it, I'd uninstall ApplySyntax and try to reinstall, restarting Sublime after reinstall. I'll double check my install and see if I see any similar errors, but I'm not currently aware of any mass breakage with the new Sublime.

mattst commented 5 years ago

Many thanks for your advice facelessuser.

Your suggestions seemed to have done the trick. I let ApplySyntax recreate its config files too in case ApplySyntax.ext-list was causing a problem.

I'll keep an eye on the console on startup over the next few days and let you know if the exceptions return.

Cheers.

mattst commented 5 years ago

No sign of any exceptions over the last few days.

I think you can close the issue.

Thanks.

facelessuser commented 5 years ago

Thanks