'NoneType' object has no attribute 'set_timeout'
brownsugar opened this issue · 1 comments
Description
Sometimes GitGutter does not work, like it's completely disabled, no blames for code and no git status in status bar (while status_bar_text is set).
Most error messages I got in the console:
Traceback (most recent call last):
File "/Users/**/Library/Application Support/Sublime Text 3/Packages/GitGutter/modules/events.py", line 209, in worker
self.start_timer(self.delay)
File "/Users/**/Library/Application Support/Sublime Text 3/Packages/GitGutter/modules/events.py", line 218, in start_timer
print(sublime.set_timeout)
AttributeError: 'NoneType' object has no attribute 'set_timeout'
Here's another one:
Exception in thread Thread-1172:
Traceback (most recent call last):
File "/Users/**/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package/modules/tasks.py", line 65, in run
File "/Users/**/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package/modules/tasks.py", line 23, in run
File "/Users/**/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package/modules/handler.py", line 806, in task_fn
File "/Users/**/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package/modules/promise.py", line 137, in resolve_fn
File "/Users/**/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package/modules/promise.py", line 149, in _do_resolve
File "/Users/**/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package/modules/promise.py", line 107, in callback_wrapper
File "/Users/**/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package/modules/commands.py", line 169, in <lambda>
File "/Users/**/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package/modules/handler.py", line 152, in repository_name
AttributeError: 'NoneType' object has no attribute 'path'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./python3.3/threading.py", line 901, in _bootstrap_inner
File "/Users/**/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package/modules/tasks.py", line 67, in run
AttributeError: 'NoneType' object has no attribute 'print_exc'
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1325, in is_enabled_
ret = self.is_enabled(**args)
File "/Users/**/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package/modules/commands.py", line 101, in is_enabled
File "/Users/**/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package/modules/handler.py", line 164, in work_tree
AttributeError: 'NoneType' object has no attribute 'realpath'
Support Info
- Sublime Text 4096
- Platform: osx
- Arch: x64
- GitGutter 1.11.3
- Install via PC: True
- git version 2.30.0
- mdpopups 3.7.5
- markdown 3.1.1
- pygments 2.1a0
- jinja2 2.10.1
ConvertToUTF8
is not installed.
Steps to Reproduce Issue
No steps, just opened Sublime text regularly, but sometimes it works.
All those tracebacks have one thing in common. They indicate functions from imported python modules not being available. The first one for instance says sublime.set_timeout()
wouldn't exist and so the others point to similar issues.
Are there certain situations when that happens. Does it happen directly after startup or while ST has been running for a while already?
I don't see such issues on Windows with exactly the same setup. ST 4096 (4097 now) GitGutter 1.11.3.
Not sure what's going on as those functions should be availbe forever once the library was imported.