<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Times New Roman, Times, serif">Thanks, my version was very
old.  I had abandoned PyLint some years back and thought I should give
it another try.<br>
<br>
I have updated to:<br>
</font>
<blockquote>modname = 'pylint'<br>
  <br>
numversion = (0, 17, 0)<br>
</blockquote>
Following your directions below, I get:<br>
<blockquote>C:\Documents and
Settings\cjw\Desktop&gt;C:\Python25\python.exe<br>
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on win32<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
&gt;&gt;&gt; from pylint import lint<br>
Traceback (most recent call last):<br>
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;<br>
  File "C:\Python25\Lib\site-packages\pylint\lint.py", line 31, in
&lt;module&gt;<br>
    from pylint.checkers import utils<br>
  File "c:\python25\lib\site-packages\pylint\checkers\utils.py", line
29, in &lt;module&gt;<br>
    FOR_NODE_TYPES = (astng.For, astng.Comprehension)<br>
AttributeError: 'module' object has no attribute 'Comprehension'<br>
</blockquote>
I have downloaded what appear to be the most recent versions of:<br>
      logilab.astng;  and<br>
      logilab.common.<br>
<br>
I would welcome any further suggestions.<br>
<br>
Colin W.<br>
<br>
Huurne, Maarten ter wrote:
<blockquote
 cite="mid:A3153C2F2EDE4449B4ACB9DEA69B2FA22F228A8B2A@NLCLUEXM12.connect1.local"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
  <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.moz-txt-citetags
        {mso-style-name:moz-txt-citetags;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
  </style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
  <div class="Section1">
  <p class="MsoNormal">“lint.py 0.9.0” is either an ancient version of
pylint, or a different package using the same file name.
  <o:p></o:p></p>
  <p class="MsoNormal"><o:p> </o:p></p>
  <p class="MsoNormal">Please try this and see if it turns up any
surprises:<o:p></o:p></p>
  <p class="MsoNormal"><o:p> </o:p></p>
  <p class="MsoNormal">$ python<o:p></o:p></p>
  <p class="MsoNormal">Python 2.5.2 (r252:60911, Oct  5 2008, 19:29:17)<o:p></o:p></p>
  <p class="MsoNormal">[GCC 4.3.2] on linux2<o:p></o:p></p>
  <p class="MsoNormal">Type "help", "copyright", "credits" or "license"
for more information.<o:p></o:p></p>
  <p class="MsoNormal">&gt;&gt;&gt; from pylint import lint<o:p></o:p></p>
  <p class="MsoNormal">&gt;&gt;&gt; lint.__file__<o:p></o:p></p>
  <p class="MsoNormal">'/usr/lib/python2.5/site-packages/pylint/lint.pyc'<o:p></o:p></p>
  <p class="MsoNormal">&gt;&gt;&gt; lint.version<o:p></o:p></p>
  <p class="MsoNormal">'0.16.0'<o:p></o:p></p>
  <p class="MsoNormal">&gt;&gt;&gt;<o:p> </o:p></p>
  <p class="MsoNormal"><o:p> </o:p></p>
  <p class="MsoNormal">Bye,<o:p></o:p></p>
  <p class="MsoNormal">                        Maarten<span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);"><o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
  <div
 style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0cm 0cm 0cm 4pt;">
  <div>
  <div
 style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">From:</span></b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:python-projects-bounces@lists.logilab.org">python-projects-bounces@lists.logilab.org</a>
[<a class="moz-txt-link-freetext" href="mailto:python-projects-bounces@lists.logilab.org">mailto:python-projects-bounces@lists.logilab.org</a>]
  <b>On Behalf Of </b>Colin J. Williams<br>
  <b>Sent:</b> 2009 Mar 20 3:27 PM<br>
  <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:python-projects@logilab.org">python-projects@logilab.org</a><br>
  <b>Subject:</b> [Python-projects] lint.py<o:p></o:p></span></p>
  </div>
  </div>
  <p class="MsoNormal"><o:p> </o:p></p>
  <div>
  <pre>On Thu, Mar 19, 2009 at 04:04:51PM -0400, Colin J. Williams wrote:<o:p></o:p></pre>
  <blockquote style="margin-top: 5pt; margin-bottom: 5pt;">
    <pre><span class="moz-txt-citetags">&gt; </span>I have downloaded PyLint and, when running it, I get the following traceback:<o:p></o:p></pre>
    <pre><span class="moz-txt-citetags">&gt; </span>...<o:p></o:p></pre>
    <pre><span class="moz-txt-citetags">&gt; </span>Could you please tell me where I should report such problems?<o:p></o:p></pre>
    <pre>  <o:p></o:p></pre>
  </blockquote>
  <pre><o:p> </o:p></pre>
  <pre>Please use <a moz-do-not-send="true"
 href="mailto:python-projects@logilab.org">python-projects@logilab.org</a><o:p></o:p></pre>
  <pre><o:p> </o:p></pre>
  <pre>and paste the output of `pylint --version`<o:p></o:p></pre>
  <pre><o:p> </o:p></pre>
  <div>
  <pre>-- <o:p></o:p></pre>
  <pre>Nicolas Chauvat<o:p></o:p></pre>
  <pre><o:p> </o:p></pre>
  <pre>logilab.fr - services en informatique scientifique et gestion de connaissances  <o:p></o:p></pre>
  <pre><o:p> </o:p></pre>
  <pre style="text-align: center;">
<hr align="center" size="2" width="100%">

  </pre>
  <pre>Nicholas,<o:p></o:p></pre>
  <pre><o:p> </o:p></pre>
  <pre>Thanks for the above pointer.  Here is the output, using PyScripter.<o:p></o:p></pre>
  <pre><o:p> </o:p></pre>
  <pre>Please let me know if I can provide any further information.<o:p></o:p></pre>
  <pre><o:p> </o:p></pre>
  <pre>Colin W.<o:p></o:p></pre>
  <pre><o:p> </o:p></pre>
  <pre><o:p> </o:p></pre>
  <pre>*** Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32. ***<o:p></o:p></pre>
  <pre><o:p> </o:p></pre>
  <pre>Command Line : --version<o:p></o:p></pre>
  <pre>No config file found, using default configuration<o:p></o:p></pre>
  <pre>lint.py 0.9.0, <o:p></o:p></pre>
  <pre>astng 0.17.4, common 0.21.2<o:p></o:p></pre>
  <pre>Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]<o:p></o:p></pre>
  <pre>Exit code:  0<o:p></o:p></pre>
  <pre>&gt;&gt;&gt; <o:p></o:p></pre>
  <pre>Command Line : lint.py<o:p></o:p></pre>
  <pre>No config file found, using default configuration<o:p></o:p></pre>
  <pre>************* Module lint<o:p></o:p></pre>
  <pre>W: 51: Redefining built-in 'enumerate'<o:p></o:p></pre>
  <pre>Traceback (most recent call last):<o:p></o:p></pre>
  <pre>  File "&lt;string&gt;", line 244, in run_nodebug<o:p></o:p></pre>
  <pre>  File "C:\Python25\Lib\site-packages\pylint\lint.py", line 811, in &lt;module&gt;<o:p></o:p></pre>
  <pre>    Run(sys.argv[1:])<o:p></o:p></pre>
  <pre>  File "C:\Python25\Lib\site-packages\pylint\lint.py", line 773, in __init__<o:p></o:p></pre>
  <pre>    linter.check(args)<o:p></o:p></pre>
  <pre>  File "C:\Python25\Lib\site-packages\pylint\lint.py", line 435, in check<o:p></o:p></pre>
  <pre>    self.check_file(filepath, modname, checkers)<o:p></o:p></pre>
  <pre>  File "C:\Python25\Lib\site-packages\pylint\lint.py", line 449, in check_file<o:p></o:p></pre>
  <pre>    astng = self._check_file(filepath, modname, checkers)<o:p></o:p></pre>
  <pre>  File "C:\Python25\Lib\site-packages\pylint\lint.py", line 473, in _check_file<o:p></o:p></pre>
  <pre>    self.check_astng_module(astng, checkers)<o:p></o:p></pre>
  <pre>  File "C:\Python25\Lib\site-packages\pylint\lint.py", line 518, in check_astng_module<o:p></o:p></pre>
  <pre>    if implements(checker, IASTNGChecker)])<o:p></o:p></pre>
  <pre>  File "C:\Python25\Lib\site-packages\pylint\lint.py", line 534, in astng_events<o:p></o:p></pre>
  <pre>    self.astng_events(child, checkers, _reversed_checkers)<o:p></o:p></pre>
  <pre>  File "C:\Python25\Lib\site-packages\pylint\lint.py", line 534, in astng_events<o:p></o:p></pre>
  <pre>    self.astng_events(child, checkers, _reversed_checkers)<o:p></o:p></pre>
  <pre>  File "C:\Python25\Lib\site-packages\pylint\lint.py", line 531, in astng_events<o:p></o:p></pre>
  <pre>    checker.visit(astng)<o:p></o:p></pre>
  <pre>  File "C:\Python25\Lib\site-packages\logilab\astng\utils.py", line 85, in visit<o:p></o:p></pre>
  <pre>    method(node)<o:p></o:p></pre>
  <pre>  File "C:\Python25\Lib\site-packages\pylint\checkers\variables.py", line 291, in visit_import<o:p></o:p></pre>
  <pre>    module = node.infer(name_parts[0], asname=False).next()<o:p></o:p></pre>
  <pre>  File "C:\Python25\Lib\site-packages\logilab\astng\inference.py", line 42, in wrapped<o:p></o:p></pre>
  <pre>    context.push(node)<o:p></o:p></pre>
  <pre>AttributeError: 'str' object has no attribute 'push'<o:p></o:p></pre>
  <pre>&gt;&gt;&gt; <o:p></o:p></pre>
  </div>
  </div>
  </div>
  </div>
  <br>
  <hr>
  <font color="Gray" face="Arial" size="1">The information contained in
this message may be confidential and legally protected under applicable
law. The message is intended solely for the addressee(s). If you are
not the intended recipient, you are hereby notified that any use,
forwarding, dissemination, or reproduction of this message is strictly
prohibited and may be unlawful. If you are not the intended recipient,
please contact the sender by return e-mail and destroy all copies of
the original message.<br>
  </font>
</blockquote>
</body>
</html>