help! newbie problem with PyChecker

Peter Hansen peter at engcorp.com
Sun May 4 22:43:48 EDT 2003


Stephen Ferg wrote:
> 
> I think I've installed PyChecker correctly on my Windows PC, but when
> I run it on one of its test files (test1.py) -- or any other program,
> for that matter -- I get the following error message.  Does anyone
> know what I might be doing wrong?
> 
> Thanks in advance.
> -- Steve (Stephen Ferg ... Steve at Ferg.org)
> 
> C:\Python22\Lib\site-packages\pychecker>python checker.py test1.py
> 
> Traceback (most recent call last):
>   File "checker.py", line 675, in ?
>     sys.exit(main(sys.argv))
>   File "checker.py", line 626, in main
>     if LOCAL_MAIN_VERSION != pychecker.MAIN_MODULE_VERSION :
> AttributeError: 'module' object has no attribute 'MAIN_MODULE_VERSION'

I'm just guessing here, but it looks like you're running it
from within the folder in which it's installed, and the
MAIN_MODULE_VERSION attribute looks like it's probably put
on the pychecker "module" by the __init__.py file... does
that get run when you import pychecker from within its own
folder?  It seems likely something like that is the problem.

If I'm anywhere close to the mark, a print inside __init__.py
to show when it gets executed, and a print just above line 626
above saying "print pychecker.__file__" might tell a little more.

-Peter




More information about the Python-list mailing list