Skip to content

Instantly share code, notes, and snippets.

@gabrielelanaro
Created June 27, 2010 19:58
Show Gist options
  • Save gabrielelanaro/455136 to your computer and use it in GitHub Desktop.
Save gabrielelanaro/455136 to your computer and use it in GitHub Desktop.
ModuleSyntaxError: Syntax error in file <blogger_bridge.py> line <82>:
Syntax errors in file blogger_bridge.py:
* line 23: invalid syntax ... fixed
* line 82: expected an indented block ... raised!
Traceback (most recent call last):
File "/home/eulero/workspace/emacs-for-python/rope-dist/ropemode/decorators.py", line 53, in newfunc
return func(*args, **kwds)
File "/home/eulero/workspace/emacs-for-python/rope-dist/ropemode/interface.py", line 274, in completions
return _CodeAssist(self, self.env).completions()
File "/home/eulero/workspace/emacs-for-python/rope-dist/ropemode/interface.py", line 593, in completions
proposals = self._calculate_proposals()
File "/home/eulero/workspace/emacs-for-python/rope-dist/ropemode/interface.py", line 620, in _calculate_proposals
resource, maxfixes=maxfixes)
File "/home/eulero/workspace/emacs-for-python/rope-dist/rope/contrib/codeassist.py", line 33, in code_assist
return assist()
File "/home/eulero/workspace/emacs-for-python/rope-dist/rope/contrib/codeassist.py", line 324, in __call__
completions = list(self._code_completions().values())
File "/home/eulero/workspace/emacs-for-python/rope-dist/rope/contrib/codeassist.py", line 392, in _code_completions
pymodule = fixer.get_pymodule()
File "/home/eulero/workspace/emacs-for-python/rope-dist/rope/base/utils.py", line 10, in _wrapper
setattr(self, name, func(self, *args, **kwds))
File "/home/eulero/workspace/emacs-for-python/rope-dist/rope/contrib/fixsyntax.py", line 42, in get_pymodule
new_message)
ModuleSyntaxError: Syntax error in file <blogger_bridge.py> line <82>:
Syntax errors in file blogger_bridge.py:
* line 23: invalid syntax ... fixed
* line 82: expected an indented block ... raised!
ModuleSyntaxError: Syntax error in file <blogger_bridge.py> line <82>:
Syntax errors in file blogger_bridge.py:
* line 23: invalid syntax ... fixed
* line 82: expected an indented block ... raised!
@ryankask
Copy link

ryankask commented Sep 7, 2010

Any updates on this issue? I'm getting the same errors.

@gabrielelanaro
Copy link
Author

Yes, it seems that the problem was the default behavior of ropemacs. To give the autocompletion it has to analyze the incomplete code, and eventually to fix some errors (since incomplete code raises errors). The max number of fixes allowed by default is 1, I've set it to 3 (setq ropemacs-codeassist-maxfixes 3) in the file http://github.com/gabrielelanaro/emacs-for-python/blob/master/epy-init.el .

If the issue is still present, well there's a problem that has to be fixed, I will take a look at ropemacs to solve this problem (this intrusive warning is overwhelming, anyway).

@ryankask
Copy link

ryankask commented Sep 7, 2010

Okay thanks. It seems like you have "(setq ropemacs-codeassist-maxfixes 3)" twice in your configuration: lines 58 and 71.

@gabrielelanaro
Copy link
Author

Thank you! I'm cleaning the duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment