JulianEberius / SublimePythonIDE

ST3 only: A rewrite of SublimeRope for ST3, uses the Rope library to add python completions and refactoring to ST3
GNU General Public License v2.0
267 stars 38 forks source link

AttributeError: 'NoneType' object has no attribute 'folders' #67

Closed alexlouden closed 9 years ago

alexlouden commented 10 years ago

I'm getting the following traceback. Any ideas what's wrong? I've noticed recently that control + clicking on variables imported from different libraries has stopped working, could this be responsible?

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 215, in on_load_async
    callback.on_load_async(v)
  File "/Users/alex/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python_linting.py", line 411, in wrapper
    return func(self, view)
  File "/Users/alex/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python_linting.py", line 431, in on_load_async
    check(view)
  File "/Users/alex/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python_linting.py", line 76, in check
    proxy = proxy_for(view)
  File "/Users/alex/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python.py", line 285, in proxy_for
    python = project_venv_python(view) or system_python()
  File "/Users/alex/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python.py", line 250, in project_venv_python
    project_dir = root_folder_for(view)
  File "/Users/alex/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python.py", line 331, in root_folder_for
    "src_root", view, None)] + window.folders():
AttributeError: 'NoneType' object has no attribute 'folders'
JulianEberius commented 9 years ago

Not really sure about this one. Still seeing this error? It's a bit strange as view.window() should always return a window and not None ... how can there be a view without a window? Ctrl-clicking works for me by the way, but I'm on the "testing" branch. Maybe this will be solved when I merge testing back to master. Sorry that I can not be of further help at the moment.

alexlouden commented 9 years ago

Thanks Julian, not to worry - I switched to the Jedi branch a while ago and everything has been working since. Could be caused by my combination of plugins or something, I'll let you know if it occurs again.

Thanks again for this plugin, much appreciated.