Menu

Lint stopped working :-(

Dobes V
2005-09-01
2013-03-15
  • Dobes V

    Dobes V - 2005-09-01

    I used to use lint without difficulty, but now that I've upgraded it completely stopped working it seems.

    I set the path to lint.py in the settings, and I even deleted and re-created my projects, then edited a python file to activate the pydev builder.  The builder is active in the project's list of builders and it DOES run and make me wait before I can save.  The problems view filters have pylint problem enabled, and both pylint and the source files in question are in the pythonpath specified as part of the project.

    The eclipse error log (Show View > Error Log) isn't showing any errors related to this, and no dialogs or errors are popping up anywhere.  I've tried inserting deliberate garbage into the file but still no go.

    However, I *do* get syntax errors reported by pydev itself, correctly displayed in the problems window and using the markers.

    My pylint version is 0.7.0, pydev 0.9.8.

    Now that I've gotten used to having pylint checking, it is very annoying to have to read my own code for errors again :-P

    So... is there a logfile or something I can look at to try and figure out what is happening to pylint?  Probably something is configured wrong somewhere, or I'm missing something pylint requires?

    Thanks for your help!

     
    • Dobes V

      Dobes V - 2005-09-01

      I did get this error (probably unrelated):

      !ENTRY org.python.pydev.core 4 4 2005-09-01 11:13:46.736
      !MESSAGE C:\work\.metadata\.plugins\org.eclipse.core.resources\.projects\Tools\org.python.pydev\asthelper.completions (The system cannot find the file specified)
      !STACK 0
      java.io.FileNotFoundException: C:\work\.metadata\.plugins\org.eclipse.core.resources\.projects\Tools\org.python.pydev\asthelper.completions (The system cannot find the file specified)
          at java.io.FileInputStream.open(Native Method)
          at java.io.FileInputStream.<init>(Unknown Source)
          at org.python.pydev.plugin.nature.IOUtils.readFromFile(PythonNature.java:413)
          at org.python.pydev.plugin.nature.PythonNature$1.run(PythonNature.java:220)
          at org.eclipse.core.internal.jobs.Worker.run(Worker.java:67)

       
    • Fabio Zadrozny

      Fabio Zadrozny - 2005-09-02

      Yeap that is unrelated...

      There should be something wrong, but from the info you passed me, everything seems right... it is even running lint from your description... (also, it works here)

      Are you sure filters are all correctly set? Is you lint.py in your system pythonpath (if you reinstalled pylint, you may need to re-create the system pythonpath)

      Cheers,

      Fabio

       
    • Dobes V

      Dobes V - 2005-09-02

      I have it in preferences -> python interpreters -> system PYTHONPATH -> System libs -> C:\python24\lib\site-packages\pylint

      Maybe there is an incompatibility with the lint that I am running?  Somehow maybe it is outputting the wrong format, or taking different parameters, so that it runs but doesn't show any errors?

      Is the command-line passed to lint available anywhere?  Maybe I should try and run it myself.

      I think maybe it did run lint for a moment when I re-created the project, but then stopped.  I just re-created the project again and it said 'Visiting ... <filename> ... PyCodeCompletionVisitor' for a while in the status view.

       
    • Dobes V

      Dobes V - 2005-09-02

      I installed pylint, but I didn't install logilab-common.  When I tried to run pylint manually from the command-line I got an ImportError.

      Maybe you can report an error if pylint throws an exception when you run it?

      But for now, my problem is fixed.  Thanks for such a great tool!

       
    • citizenkahn

      citizenkahn - 2005-09-21

      I am pretty confused.  I have a class that is ugly enough to warrent some pylint errors/warnings and pylint is silent.  I have looked that the docs and found a variance.

      The image here http://pydev.sourceforge.net/images/pylint_prefs.png

      should the pylint location lying below eclipse\plugins\org.python.pydev_0.9.8.1\PySrc\ThirdParty
      but the text indicates
      "you should go to the pylint preferences page, specify its location (it MUST be installed in the site-packages)"

      I have pylint installed and all looks good, but no lint for me...
      1. downloaded PyLint 0.7 from http://www.logilab.org/projects/pylint/0.7
      2. unziped it and ran the install (python setup.py install)
      2.a it failed with this error:
      ackage init file '.\test\__init__.py' not found (or not a regular file)
      running build_scripts
      creating build\scripts-2.4
      copying bin\pylint.bat -> build\scripts-2.4
      copying bin\pylint-gui.bat -> build\scripts-2.4
      copying bin\symilar.bat -> build\scripts-2.4
      running install_lib
      byte-compiling C:\comp\python24\Lib\site-packages\pylint\test\input\func_continue_not_in_loop.py to func_continue_not_in_loop.pyc
      byte-compiling C:\comp\python24\Lib\site-packages\pylint\test\input\func_syntax_error.py to func_syntax_error.pyc
      byte-compiling C:\comp\python24\Lib\site-packages\pylint\test\input\func_unknown_encoding.py to func_unknown_encoding.pyc
        File "C:\comp\python24\Lib\site-packages\pylint\test\input\func_continue_not_in_loop.py", line 8
          continue
      SyntaxError: 'continue' not properly in loop
        File "C:\comp\python24\Lib\site-packages\pylint\test\input\func_syntax_error.py", line 1
          def toto
                  ^
      SyntaxError: invalid syntax

      3. Launch Ecplise point to <python install>\Libs\site-packages\pylint\lint.py

      No pylint for me.

      So, after much frustration I gave up.  Pylint hasn't had a release since 5/24, therefore the pylint that was bundled with Pydev9.5 must be OK.  I grabbed the logilab directory from the pydev9.5
      and put it in my 0.9.8.1 directory
      src: eclipse\plugins\org.python.pydev_0.9.5\PySrc\ThirdParty\logilab
      dest:  eclipse\plugins\org.python.pydev_0.9.8.1\PySrc\ThirdParty\logilab

      I then pointed my "Location of Pylint" preference at
      eclipse\plugins\org.python.pydev_0.9.8.1\PySrc\ThirdParty\logilab\pylint\lint.py

      and did a rebuild of my workspace.  Voila, I have oodles of warnings indicating that I am a sloppy programmer.  Thank god, I'd hate to be otherwise...

      So, I do not know why pylint wouldn't install properly, but until there is a reason for me to upgrade to a new and better pylint, I see no reason to care about it much. 

       
      • Fabio Zadrozny

        Fabio Zadrozny - 2005-09-22

        Did you try to see if pylint runs correctly in the prompt? It may be that you didn't get its dependencies (logilab-commons).

        Otherwise it may be some other pylint error (which you should report to the pylint team).

        Cheers,

        Fabio

         
    • Dragos Dobrota

      Dragos Dobrota - 2005-10-11

      Got the same problem, then determined that I forgot to download and install the `common` package.

      Now it works (pylint-0.7.0.tar.gz, common-0.12.0.tar.gz)