SendCode icon indicating copy to clipboard operation
SendCode copied to clipboard

Restart sublime to initialize sendcode

Open pochedls opened this issue 4 years ago • 3 comments

Recently, SendCode frequently will not work when I try to use it on opening Sublime Text (ST3). The problem is fixed if I simply quit Sublime and re-open it. The error message below is displayed when it is not working. Is there a way to initialize the from_view without restarting Sublime Text (if this is the issue)?

The typical chain of events is: SendCode works. Close Sublime for the day. Next day start ST3 (SendCode does not work). Restart ST3. SendCode works again.

using gpu buffer for window
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1088, in run_
    return self.run(edit)
  File "/Users/username/Library/Application Support/Sublime Text 3/Packages/SendCode/send_code.py", line 81, in run
    sender = CodeSender.initialize(self.view, prog=prog, from_view=cmd is None)
  File "/Users/username/Library/Application Support/Sublime Text 3/Packages/SendCode/code_sender/sender.py", line 35, in initialize
    syntax = Settings(view).syntax()
  File "/Users/username/Library/Application Support/Sublime Text 3/Packages/SendCode/settings.py", line 15, in __init__
    self.s = sublime.load_settings("SendCode.sublime-settings")
AttributeError: 'NoneType' object has no attribute 'load_settings'

pochedls avatar Dec 03 '19 17:12 pochedls

I guess it’s due to the recent updates? The error was shown when SendCode was secretly updated.

randy3k avatar Dec 03 '19 17:12 randy3k

Thanks @randy3k - do you mean when Sublime Text was updated or SendCode was updated? I guess I would be surprised if SendCode was "secretly" updated (since you own this repository).

pochedls avatar Dec 03 '19 17:12 pochedls

To say it right, SensCode was updated recently. What I meant was Package Control would automatically download and install updates if they are available.

randy3k avatar Dec 03 '19 17:12 randy3k