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

'module' object has no attribute 'ReturnOutsideFunction' #81

Open autumnjolitz opened 8 years ago

autumnjolitz commented 8 years ago

My Sublime recently updated to the most recent SublimePythonIDE version and no longer parses valid Python code in my Flask project.

The console prints:

SublimePythonIDE: No server response
'module' object has no attribute 'ReturnOutsideFunction'

When I terminate the server.py program, I see:

started server on port 57389 with ['/Users/BenJolitz/.virtualenvs/cpython27/bin/python']
SublimePythonIDE: No server response
'module' object has no attribute 'ReturnOutsideFunction'
JulianEberius commented 8 years ago

Hi,

thanks for the report! I'm not really sure how to reproduce this. Looks like some reloading problem that could be fixed by just restarting Sublime Text.

If not, and you find some time, you could add the lines

import traceback
traceback.print_exc()

in sublime_python_linting.py at line 122 to get a full stracktrace.

Julian

autumnjolitz commented 8 years ago

Thanks Julian.

I've sutured in the traceback print statement.

Traceback (most recent call last):
  File "/Users/BenJolitz/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python_linting.py", line 107, in check
    parse_errors(view, errors, lines, vid)
  File "/Users/BenJolitz/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python_linting.py", line 323, in parse_errors
    pyflakes.messages.ReturnOutsideFunction,
AttributeError: 'module' object has no attribute 'ReturnOutsideFunction'
SublimePythonIDE: No server response
JulianEberius commented 8 years ago

Looks like a broken installation to me. The attribute "ReturnOutsideFunction" is definitely there in the current version (https://github.com/JulianEberius/SublimePythonIDE/blob/master/pyflakes/messages.py#L130) ... maybe try removing SublimePythonIDE and reinstalling it?