In line 65 of .vim/eclim/autoload/eclim/python/validate.vim, an error is issued for any returncode > 1. With the latest pyflakes versions, the value of the returncode is equal to the number of warnings (and errors?) found, which can obviously exceed 1, generating an "error running pyflakes" message when there is no error running it.
What version of pyflakes are you using? I have the Divmod pyflakes 0.4.0 and don't have this issue. Are you using a development version? Perhaps the fork by Kevin Watters?
I suspect it is the same version. The Ubuntu Lucid package version is 0.4.0-1.
If I save the following to "x.py":
a = b
e = g
then I observe the following at the commandline:
[4 lines of warnings printed]
Is this different in your case?
I get the following:
$ python -c "import pyflakes; print pyflakes.version"
$ pyflakes test.py
test.py:2: 'd' imported but unused
test.py:3: 'f' imported but unused
test.py:4: undefined name 'b'
test.py:5: undefined name 'g'
$ echo $?
When I get time I'll try using a vanilla checkout from the divmod svn repos to see what their return codes is since one of our distros (yours: Ubuntu/Debian or mine: Arch) may be mucking with the return code. That or some other oddity is going on.
On my system /usr/bin/pyflakes exits with whatever pyflakes.scripts.pyflakes.main() returns. And main() returns a variable called "warnings" which (except in the case of more serious errors) contains the number of warnings printed (see lines 69-71).
Sorry for the long delay in responding. I finally got a chance to look into this and it turns out that debian patches pyflakes to behave this way (which by using Ubuntu you get to inherit). Both the pyflakes on my system and the one on the trunk of the Divmod svn repos exit the pyflakes.scripts.pyflakes main() function like so:
raise SystemExit(warnings > 0)
Then I went to the debian package page (http://packages.debian.org/sid/pyflakes) and there is a patch to pyflakes (http://ftp.de.debian.org/debian/pool/main/p/pyflakes/pyflakes_0.4.0-1.diff.gz) which includes the following change:
@@ -64,4 +64,4 @@
warnings += check(sys.stdin.read(), '')
- raise SystemExit(warnings > 0)
+ return warnings
So, it looks like I'll have to make the annoying assumption that everyone's pyflakes behaves this way, or attempt to detect this sillyness and handle it as an edge case.
Closing now that eclim no longer uses pyflakes for validation (switched to pydev).