jarhart / SublimeSBT

SBT build tool integration for Sublime Text 2 and Sublime Text 3.
MIT License
98 stars 10 forks source link

Does not install properly on ST3+W8 #19

Open z-m-k opened 11 years ago

z-m-k commented 11 years ago

On install I get in the console:

Traceback (most recent call last):
  File "errormarker in \Apps\Sublime Text\Data\Installed Packages\SublimeSBT.sublime-package", line 28, in mark_errors_in
  File "errormarker in \Apps\Sublime Text\Data\Installed Packages\SublimeSBT.sublime-package", line 57, in _mark_errors_in_view
  File "errormarker in \Apps\Sublime Text\Data\Installed Packages\SublimeSBT.sublime-package", line 78, in _highlighter
  File "highlighter in \Apps\Sublime Text\Data\Installed Packages\SublimeSBT.sublime-package", line 18, in __init__
  File "highlighter in \Apps\Sublime Text\Data\Installed Packages\SublimeSBT.sublime-package", line 95, in _update_highlight_args
  File "highlighter in \Apps\Sublime Text\Data\Installed Packages\SublimeSBT.sublime-package", line 101, in _create_highlight_args
TypeError: 'NoneType' object is not subscriptable

After this, none of the commands show up in the palette.

jarhart commented 11 years ago

Do you have a Packages\User\SublimeSBT.sublime-settings file from an old install of the plugin? You can check by accessing _Preferences > Browse Packages..._ and looking in the User folder.

z-m-k commented 11 years ago

This is my first time installing it, so no.

witZack commented 10 years ago

Getting this error as well in ST3

jarhart commented 10 years ago

What platform?

witZack commented 10 years ago

OSX v10.9.1

jarhart commented 10 years ago

If you try installing it again, does it fail every time?

witZack commented 10 years ago

Yup, consistently seeing Traceback (most recent call last): File "errormarker in /Users/wzack/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package", line 28, in mark_errors_in File "errormarker in /Users/wzack/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package", line 57, in _mark_errors_in_view File "errormarker in /Users/wzack/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package", line 78, in _highlighter File "highlighter in /Users/wzack/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package", line 18, in __init__ File "highlighter in /Users/wzack/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package", line 95, in _update_highlight_args File "highlighter in /Users/wzack/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package", line 101, in _create_highlight_args TypeError: 'NoneType' object is not subscriptable

Note the project claims to be installed after this happens and preferences/settings are available for customization, but nothing works.

jarhart commented 10 years ago

Do you have an sbt project currently open in ST3? I'm trying figure out how to reproduce this, otherwise I have no way to debug it.

witZack commented 10 years ago

Yup, a very skeleton sbt project is open. Simple build file and few scala files. Just trying to install plugin through package control with ST3 + OSX v10.9.1

jarhart commented 10 years ago

Try installing with nothing open in ST3.

witZack commented 10 years ago

Ok, that looks to have installed, but i am seeing no commands in my palette and non of the shortcut commands work either.

jarhart commented 10 years ago

With the SBT project open you're not seeing the commands?

witZack commented 10 years ago

Correct the only thing that comes up when I look for SBT is: SublimeREPL: SBT for opened folder

jarhart commented 10 years ago

Try completely quitting and restarting ST3.

witZack commented 10 years ago

Did that, attempted to set sublimeSBT settings through the example snippet in Readme. I think maybe ST3 isn't seeing the project as a 'sbt' project for whatever reason.

jarhart commented 10 years ago

Yeah, if you're not seeing the commands either it's not seeing the project as an SBT project, or it's erroring out somewhere. Are you seeing errors in the console? If there's any ".sbt" file in the project root or any ".scala" file in under project/ it should see it as an SBT project.

witZack commented 10 years ago

Yes, my project was defined in such a way as .sbt not being in the root folder. Thanks for the help! All is working now.

boonedox commented 9 years ago

I'm getting similar behavior, except that "SBT: Clear History" is the only command showing up. I see the same error in the console when I install or enable the package. I'm running ST3, build 3065. I've got a scala file in the directory as well as .sbt.

robstarbuck commented 9 years ago

Getting exactly the same problem as @boonedox. Here's the output from the installation:

inkytonik commented 9 years ago

I don't have a W8 machine to try on but perhaps we can investigate together. Most of the crashes are in the following code from sbtsettings.py (line 55 is the second line):

def _view_settings(self):
    for view in maybe(self.window.active_view()):
        return view.settings().get('SublimeSBT', {})
    return {}

It seems strange for this to be going wrong, so probably the first thing to do is to print some stuff out to see things in more detail. If you're up for poking around, try inserting (untested):

print ('window: ' + str(self.window))
print ('active_view: ' + str(self.window.active_view()))

Reload and see what happens.