mtxr / SublimeText-SQLTools

SQLTools for Sublime Text 3
https://code.mteixeira.dev/SublimeText-SQLTools/
GNU General Public License v3.0
177 stars 40 forks source link

SQLTools not functioning after update of ST3 #198

Closed markljackson closed 6 years ago

markljackson commented 6 years ago

Issue Type

commands will not run. I've tried CTRL+e,e. I've also tried the command palette. No joy.

I can get to the settings through command palette, but no actions are accessible.

Bug/Error

Description

When I try to run code with CTRL+e,e nothing happens.

Version

Steps to Reproduce (For bugfixes)

  1. enter code in editor
  2. highlight code
  3. press CTRL + e, e

Expected behavior:

Code to run against MySQL database.

Actual behavior:

Nothing happens. I've tried all of the commands that act on the database, and nothing happens.

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1036, in run_
    return self.run()
  File "/Users/MY_USER_NAME/Library/Application Support/Sublime Text 3/Packages/SQLTools/SQLTools.py", line 559, in run
    ST.selectConnection(tablesCallback=lambda: Window().run_command('st_execute'))
  File "/Users/MY_USER_NAME/Library/Application Support/Sublime Text 3/Packages/SQLTools/SQLTools.py", line 359, in selectConnection
    ST.connectionList = getConnections()
  File "/Users/MY_USER_NAME/Library/Application Support/Sublime Text 3/Packages/SQLTools/SQLTools.py", line 96, in getConnections
    connectionsObj[name] = createConnection(name, config, settings=settings.all())
AttributeError: 'NoneType' object has no attribute 'all'
tkopets commented 6 years ago

Hello Mark! Thank you for reporting this issue. Can you provide a bit more info on your issue: Please review the entire Sublime Console history to see if there are any other errors before the one you posted? Is there any chance you have modified the SQLTools settings recently and SQLTools fails to parse the settings file (e.g. not a valid JSON anymore)? Or it worked fine before the update and just stopped working after Sublime update?

My Sublime just updated to v. 3170 on Mac and looks fine, so I assume this issue must be specific to your environment.

markljackson commented 6 years ago

It appears that some Python settings were pasted into the SQLTools user settings. It was this:

{ "auto_complete_triggers": [ {"selector": "text.html", "characters": "<" }, {"selector": "source.sql", "characters": "."} ] }

Took the out, and all seems well.

Thanks for the help.