Skip to content
This repository was archived by the owner on Mar 12, 2020. It is now read-only.
This repository was archived by the owner on Mar 12, 2020. It is now read-only.

dissapearing settings #82

@abuckenheimer

Description

@abuckenheimer

Getting the following traceback trying to select a connection.

Traceback (most recent call last):
  File "C:\Users\abuckenheimer\AppData\Roaming\Sublime Text 3\Packages\SQLTools\SQLTools.py", line 225, in <lambda>
    Window().show_quick_panel(menu, lambda index: ST.setConnection(index, tablesCallback, columnsCallback, functionsCallback))
  File "C:\Users\abuckenheimer\AppData\Roaming\Sublime Text 3\Packages\SQLTools\SQLTools.py", line 210, in setConnection
    ST.loadConnectionData(tablesCallback, columnsCallback, functionsCallback)
  File "C:\Users\abuckenheimer\AppData\Roaming\Sublime Text 3\Packages\SQLTools\SQLTools.py", line 197, in loadConnectionData
    ST.conn.getTables(tbCallback)
  File "C:\Users\abuckenheimer\AppData\Roaming\Sublime Text 3\Packages\SQLTools\SQLToolsAPI\Connection.py", line 63, in getTables
    query = self.getOptionsForSgdbCli()['queries']['desc']['query']
  File "C:\Users\abuckenheimer\AppData\Roaming\Sublime Text 3\Packages\SQLTools\SQLToolsAPI\Connection.py", line 176, in getOptionsForSgdbCli
    return self.settings.get('cli_options', {}).get(self.type)
AttributeError: 'NoneType' object has no attribute 'get'

I just upgraded to sublime build 3128 so its quite possibly related to that.

I followed the settings through the code and I could see them being set in SQLTools@startPlugin(), and then being passed in at SQLToolsAPI.Connection@init. But something must happen to them inbetween initialization and getOptionsForSgdbCli. Passing the "items" attribute of a Settings object seems fishy to me but I'm not sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions