SublimePythonIDE icon indicating copy to clipboard operation
SublimePythonIDE copied to clipboard

'module' object has no attribute 'ReturnOutsideFunction'

Open autumnjolitz opened this issue 9 years ago • 3 comments

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'

autumnjolitz avatar Feb 01 '16 18:02 autumnjolitz

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

JulianEberius avatar Feb 01 '16 20:02 JulianEberius

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

autumnjolitz avatar Feb 02 '16 01:02 autumnjolitz

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?

JulianEberius avatar Feb 02 '16 18:02 JulianEberius